Skip to content

Run the project's own Action on pull requests - #2

Merged
JingYu-create520 merged 1 commit into
mainfrom
ci/self-hosted-index-review
Sep 22, 2026
Merged

JingYu-create520 merged 1 commit into
mainfrom
ci/self-hosted-index-review

Conversation

@JingYu-create520

Copy link
Copy Markdown
Owner

Why

The README tells people to write uses: JingYu-create520/sql-index-advisor@v0, and the changelog has been honest that this Action had never run as a check on a real pull request. This PR is that run: the published tag, on a GitHub runner, reviewing a mapper added here.

What is in it

  • .github/workflows/index-review.yml — uses: JingYu-create520/sql-index-advisor@v0, min-severity: info, fail-on: off. It comments, it does not gate, so a team can adopt it without their builds going red.
  • examples/pr-demo/OrderSearchDao.xml — four statements, each carrying one known problem, plus demo-schema.json so the schema-dependent rules have something to compare against.

Expected annotations

SIA001 for the join key and the un-indexed sort column, SIA004 for DATE(create_time) and for the leading-wildcard LIKE, SIA006 for the literal LIMIT 120000, 20.

The README tells people to write uses: JingYu-create520/sql-index-advisor@v0
while the changelog admitted the Action had never run as a check on a real
pull request. This workflow is that run, against a demo mapper carrying
four known problems. The fixture is named demo-schema.json because
schema.json is gitignored on purpose: it is user output, not source.
JingYu-create520 added a commit that referenced this pull request Sep 22, 2026
npm prepares a git dependency inside a throwaway clone, and on a clean
runner the dev toolchain is not there, so the hook died with
"tsup: not found" and the documented install command failed with exit 127.
Our own review workflow caught it on pull request #2.

The bundle is now committed, prepare rebuilds only when tsup is present,
and CI rebuilds and fails if dist drifts from src, then installs the
package into an empty project so a stranger's install path is exercised
before we ship it.
@JingYu-create520
JingYu-create520 merged commit 0330630 into main Sep 22, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant