ci(commitlint): make the PR-title check report on merge_group for the queue - #479
Merged
Conversation
… queue Enabling the merge queue requires every required status check to also report on the `merge_group` event. The Conventional-Commits PR-title check only ran on `pull_request` (it reads `pull_request.title`), so as a required check it would deadlock every queued PR — which is why it had to be dropped from the required set when the queue was enabled. This restores it as a hard gate, queue-compatible: on `merge_group` the job recovers the PR number from the queue ref (`gh-readonly-queue/<base>/pr-<N>-<sha>`), fetches that PR's title, and re-lints it against the same Conventional-Commits pattern — the squash subject that will actually land on main. The pull_request path (sticky advisory comment, fast author feedback) is unchanged; the merge_group path is a pass/fail gate with no comment. The check context name is unchanged, so it can be re-added to the ruleset's required set. The queue is configured for single-PR groups (max_entries_to_build / max_entries_to_merge = 1) so the ref always names exactly one PR. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
githubrobbi
enabled auto-merge
June 26, 2026 15:29
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.
Why
Enabling the merge queue required dropping
PR title — Conventional Commitsfrom the ruleset's required checks: a merge queue requires every required check to also report on themerge_groupevent, but the title linter only ran onpull_request(it readspull_request.title), so as a required check it would deadlock every queued PR.This restores the title gate, queue-compatible, so hard Conventional-Commits enforcement comes back inside the queue (release-plz infers the version + changelog from the title — a non-conforming title silently ships no changelog entry).
How
commitlint.ymlnow also triggers onmerge_group. On that event (which carries no PR title) the job recovers the PR number from the queue refgh-readonly-queue/<base>/pr-<N>-<sha>, fetches that PR's title, and re-lints it against the same Conventional-Commits pattern — the squash subject that will land. Thepull_requestpath (sticky advisory comment, fast author feedback) is unchanged; themerge_grouppath is a pass/fail gate. Same check-context name, so it can be re-added to the ruleset's required set.Single-PR queue groups (
max_entries_to_build/merge = 1) guarantee the ref names exactly one PR.Follow-up (right after this merges)
Re-add
PR title — Conventional Commitsto themain-protectionruleset'srequired_status_checks(done out-of-band via the API).