Repository navigation
fix(ci): re-arm release-merge via workflow_run instead of check_suite - #319
Merged
Merged
Conversation
An approval given before CI finishes relied entirely on `check_suite: completed` to re-fire the merge check once the last one went green. GitHub does not reliably deliver that event for an integration branch's own check suite: CLDMV/slothlet#437 sat fully green and approved for 20+ minutes with nothing re-triggering the merge job — no check_suite-triggered run of release-merge.yml occurred at all despite coverage finishing and the PR going green (#318). Add a `schedule` cron trigger (every 10 minutes) alongside the existing check_suite fast path. On a schedule event neither `pr_number` nor `head_branch` are set, so action.mjs's existing fallback resolution (scan open PRs for the release PR) already handles it with no code changes — cheap when idle (a couple of GET calls, then exit). check_suite stays as a best-effort fast path; the cron is what actually guarantees convergence. Applied to this repo's own local-release-merge.yml and the org-wide caller template (examples/individual-repo-workflows/release-flow-v4/ release-merge.yml) so future adopters get it by default. Existing adopters (currently just slothlet) need the same change applied to their own copy of the caller — it isn't picked up via the @v4 pin since the triggers live in the caller file each repo owns.
… for #318 The previous commit added a schedule cron as a "guaranteed" fallback, but that's the wrong tool: it's a wasteful always-on poll (every consumer, every 10 minutes, forever) papering over the real mechanism instead of fixing it, and still adds up to 10 minutes of latency in the common case. The actual cause of #318: GitHub does not deliver `check_suite: completed` for a check suite created by GitHub Actions itself — which is every check a repo's own ci.yml, coverage-badge, and PR-comment jobs produce — only for one created by a third-party App. That's why zero check_suite-triggered runs of release-merge.yml ever fired for slothlet PR #437's own head branch: the trigger was silently dead for the exact case it exists to handle. `workflow_run` is GitHub's documented replacement for "re-run something when this other workflow finishes" and doesn't have that restriction. Replace `check_suite: completed` + `schedule` with `workflow_run`, naming the caller's own ci.yml by its literal workflow name (required — workflow_run matches on name, not filename, and can't be templated via an expression in `on:`). Thread `workflow_run.head_branch` through `workflow-release-merge.yml` as the primary source for the `head_branch` input, falling back to `check_suite.head_branch` for a caller that hasn't re-synced its template copy yet or genuinely has a third-party App's check suite worth listening to. action.mjs's resolution logic is unchanged — it already treats `head_branch` generically regardless of which event produced it. Applied to this repo's own local-release-merge.yml and the org-wide caller template. Existing adopters (slothlet) get a follow-up commit with the same change, for the same reason a caller-file trigger change never arrives via the @v4 pin — see the previous commit's discussion.
Shinrai
approved these changes
Sep 21, 2026
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.
🚀 What's Changed
💥 Breaking Changes
No breaking changes
✨ Features
No new features
🐛 Bug Fixes
📦 Dependencies
No dependency updates
🔧 Other Changes
No other changes
👥 Contributors