Skip to content

Commit 86f03c3

Browse files
sirtimidclaude
andauthored
fix(ci): allow check-workflows to be skipped in merge queue skip path (#898)
## Summary The `all-jobs-complete` gate job was failing with `"check-workflows did not succeed"` during merge queue runs when only CI files changed ([failed run](https://github.com/MetaMask/ocap-kernel/actions/runs/23610005457/job/68765093258)). **Root cause**: When the merge queue determines a PR is already up-to-date with main (`skip-merge-queue=true`), `check-workflows` is intentionally skipped. However, the `all-jobs-complete` gate unconditionally required `check-workflows == success` whenever `HAS_CI` was true, causing a spurious failure. **Fix**: Add `check-skip-merge-queue` as a dependency of `all-jobs-complete` and skip the `check-workflows` requirement when `skip-merge-queue` is `true` — mirroring the escape hatch that `all-jobs-pass` already has. ## Changes - Add `check-skip-merge-queue` to the `needs` list of `all-jobs-complete` so its outputs are accessible - Guard the `check-workflows` assertion with a `skip-merge-queue != true` condition ## Testing The fix was verified by tracing the exact failure scenario from the [merge queue run](https://github.com/MetaMask/ocap-kernel/actions/runs/23610005457). The `all-jobs-pass` job already passed in that run via its own escape hatch, confirming the issue was cosmetic (red X on `all-jobs-complete`) rather than a merge blocker. This PR makes `all-jobs-complete` itself behave correctly in this path. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: only adjusts GitHub Actions job gating logic to tolerate an intentionally skipped `check-workflows` job when `skip-merge-queue` is true. > > **Overview** > Prevents false CI failures in merge-queue runs where the PR is already up to date and `check-workflows` is intentionally skipped. > > `all-jobs-complete` now depends on `check-skip-merge-queue` and only requires `check-workflows` to have succeeded when `skip-merge-queue` is not `true`, aligning the final gate behavior with the merge-queue skip path. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 189a693. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 05f513c commit 86f03c3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/main.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ jobs:
232232
if: ${{ always() }}
233233
needs:
234234
- detect-changes
235+
- check-skip-merge-queue
235236
- check-workflows
236237
- analyse-code
237238
- lint-build-test
@@ -261,8 +262,10 @@ jobs:
261262
fi
262263
263264
# check-workflows runs for both CI and code changes; require it when either is present
265+
# It is intentionally skipped when the merge queue decides to skip (PR already up-to-date)
264266
if [[ "$HAS_CI" == "true" || "$HAS_CODE" == "true" ]]; then
265-
if [[ "${{ needs.check-workflows.result }}" != "success" ]]; then
267+
if [[ "${{ needs.check-skip-merge-queue.outputs.skip-merge-queue }}" != "true" \
268+
&& "${{ needs.check-workflows.result }}" != "success" ]]; then
266269
echo "check-workflows did not succeed"
267270
exit 1
268271
fi

0 commit comments

Comments
 (0)