ci: add changeset merge guard for merge queue#7440
Conversation
|
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
Pull request overview
Improves the resilience of the CD workflow when the Changesets “Version Packages” branch is blocked by GitHub’s merge queue, preventing the workflow from failing in that scenario.
Changes:
- Add
continue-on-error: trueto thechangesets/actionstep in the CD workflow.
@coveo/atomic
@coveo/atomic-hosted-page
@coveo/atomic-legacy
@coveo/atomic-react
@coveo/auth
@coveo/bueno
@coveo/create-atomic
@coveo/create-atomic-component
@coveo/create-atomic-component-project
@coveo/create-atomic-result-component
@coveo/create-atomic-rollup-plugin
@coveo/headless
@coveo/headless-react
@coveo/shopify
commit: |
Adds a workflow that prevents a race condition where a changeset version PR is batched in the merge queue with a PR that adds new changesets. Without this guard, the version PR merges without accounting for the new changesets, causing the CD to create another version PR instead of publishing. The check detects if a version PR commit is in the merge group and fails if unprocessed changeset files remain. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
e5951da to
02e2c3f
Compare
Move the changeset-merge-guard job from a standalone workflow into ci.yml where it already has merge_group trigger. This eliminates a separate workflow file and means the check is automatically included in the existing CI required status checks. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add changeset-merge-guard to the is-valid-merge-queue needs list so that a guard failure propagates to 'Confirm build is valid' and actually blocks the merge queue batch. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move inline shell script from ci.yml into a reusable composite action at .github/actions/changeset-merge-guard/ as requested in PR review. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
https://coveord.atlassian.net/browse/KIT-5622
Changeset merge guard
Adds a
changeset-merge-guardjob to the existing CI workflow (ci.yml) that prevents stale version PRs from being merged through the merge queue.Problem
When a version PR (
ci(changesets): version packages) and a changeset-adding PR enter the merge queue in the same batch, they can merge together. The CD then finds unprocessed changesets and enters "create PR" mode instead of publishing — delaying the release by one cycle.Solution
A new
changeset-merge-guardjob inci.yml(which already triggers onmerge_group) that:.changeset/*.mdfilesThe job is wired into
is-valid-merge-queueso failures propagate toConfirm build is valid.Behavior matrix
All 13 scenarios (including edge cases) tested locally with
act.Prerequisites
Merge queue must be enabled on
mainfor themerge_grouptrigger to fire.