ci(grammars): merge the grammar repin automatically - #21
Merged
Merged
Conversation
The repin job opened a pull request and stopped there, so every daily run only refreshed a branch nobody merged: the re-pinned wasm never reached main and never got released, which defeats the point of the job. It now runs every check ci.yml would run on that pull request — typecheck, test, reproducible bundle and the Node 18 smoke — inside the job, against the exact committed tree, then squash-merges its own pull request and deletes the branch. The pull request stays as the record of what landed; it is no longer a review gate nobody attends, and the branch commit subject stays the conventional `fix(grammars): ...` that cuts the patch release. Because the merge is performed with GITHUB_TOKEN, GitHub's anti-recursion rule keeps it from starting release.yml's `on: push`. release.yml gains a `workflow_dispatch` trigger and the repin job dispatches it after merging, so the re-pinned grammars are actually published instead of sitting on main under a stale ENGINE_VERSION. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012xGuFnYS4EJsb9p7PrMLvQ
maxgfr
marked this pull request as ready for review
September 14, 2026 07:22
Contributor
|
🎉 This PR is included in version 2.30.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The grammar repin job opened a pull request and stopped there, so every daily run only refreshed a branch nobody merged (
#20, open since Sept 11 with green checks). The re-pinned wasm never reachedmainand never got released — which defeats the point of the job.What changed
.github/workflows/grammars-repin.ymlci.yml'ssmoke-node18job (loadsscripts/engine.mjs, runs the CLI on the mini-repo fixture). A grammar bump also movesweb-tree-sitter's inlined runtime, so this is exactly the regression that must not auto-merge unnoticed. The job now runs every checkci.ymlwould run on that PR — typecheck, test, reproducible bundle, Node 18 smoke — against the exact committed tree.mainat one conventionalfix(grammars): ...subject, which is what semantic-release turns into the patch release. Falls back to a merge commit if squashing is disabled on the repo.git push origin --deleterather thangh pr merge --delete-branch, since that flag also prunes the local branch the job has checked out; a failed cleanup must not fail a merge that already landed.gh workflow run ci.ymldispatch — the PR is merged in the same run, so a CI run against a deleted branch had nothing left to guard..github/workflows/release.ymlworkflow_dispatchtrigger. The merge above is performed withGITHUB_TOKEN, so GitHub's anti-recursion rule (already documented in this file for the image publish) keeps the resulting push tomainfrom startingon: push. The repin job dispatches the release run after merging, so the re-pinned grammars are published instead of sitting onmainunder a staleENGINE_VERSION. semantic-release is a no-op when nothing releasable landed, so an extra dispatch is harmless.Notes
ci.ymlon the branch would only re-run the same checks, and aGITHUB_TOKEN-created PR does not start them by itself.changed=falsepath still exits early.🤖 Generated with Claude Code
https://claude.ai/code/session_012xGuFnYS4EJsb9p7PrMLvQ
Generated by Claude Code