ci: add merge_group trigger to enable GitHub merge queue - #9470
Conversation
Adds the merge_group event so CI runs against the temporary stacked branch GitHub creates when a PR enters the queue. Without this, the queue has no checks to wait on and cannot gate merges. Changes: - Add merge_group: checks_requested trigger - Fall back to github.sha for checkout ref (PR sha is null in queue context) - Fall back to master for GITHUB_BASE_REF when unset (merge_group context) - Skip commit-lint in merge_group — commits already vetted at PR CI time A repo admin must also enable "Require merge queue" on the master branch protection rule, set strategy to ALLGREEN, and require the all-checks job. WCI-1097 TICKET: WCI-1097
|
Claude finished @Marzooqa's task —— View job Code Review Progress
Code Review: GitHub Merge Queue ImplementationThis PR correctly implements GitHub merge queue support in the CI workflow. The changes are well-thought-out and address the key requirements for merge queue functionality. ✅ Strengths1. Proper Event Trigger Configuration merge_group:
types: [checks_requested]
2. Robust Checkout Reference Handling ref: ${{ github.event.pull_request.head.sha || github.sha }}
3. Base Reference Fallback Logic git fetch origin ${GITHUB_BASE_REF:-master}
GITHUB_REPO_BRANCH=${GITHUB_BASE_REF:-master} yarn run check-commits
4. Selective Commit Linting if: matrix.check == 'commit-lint' && github.event_name != 'merge_group'
5. Path Filter Updates
🔍 Technical AnalysisChanges Job Behavior: The All-Checks Job: The existing
|
Allows the API Spec Check to run during merge queue so stale CI can't land broken commits on master. Previously, if master was broken, any PR's API Spec Check would fail because the merge base was the broken commit — the queue resolves this by always building against current master. Changes: - Add merge_group: checks_requested trigger - Fall back to github.sha for checkout ref (PR sha is null in queue context) - Fall back to master for base ref when unset (merge_group context) WCI-1097 TICKET: WCI-1097
20b2216
Summary
Wires up the
merge_groupevent inci.ymlso GitHub's merge queue has CI checks to gate on before landing PRs onmaster.merge_group: types: [checks_requested]triggergithub.shafor checkoutref(PR sha is null in queue context)masterforGITHUB_BASE_REFwhen unset (merge_group context)commit-lintin merge_group — commits already vetted when the PR's own CI ranThe existing
all-checksumbrella job serves as the required status check — no new jobs needed.Remaining step (requires repo admin)
In Settings → Branches → Edit rule for
master:ALLGREENall-checks260–120 minLinear
WCI-1097