fix: use App token for auto-merge to unblock post-merge events#91
Merged
Conversation
When GITHUB_TOKEN enables auto-merge, the resulting merge is attributed to github-actions[bot]. GitHub suppresses all events from GITHUB_TOKEN, so the pull_request:closed and push events never fire. This prevents the post-merge workflow from running (no auto-update of open PR branches, no CI/security/scorecard triggers on main). Fix: use the patchloom-release App token for gh pr merge --auto. Events from GitHub App tokens are not suppressed, so post-merge triggers correctly. Also skips both the token generation and auto-merge steps for release PRs (patchloom-release[bot] author) so the maintainer controls release timing. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
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.
Problem
When
GITHUB_TOKENenables auto-merge (gh pr merge --auto), themerge is attributed to
github-actions[bot]. GitHub suppresses allevents from
GITHUB_TOKEN, so:pull_request: closednever firespushto main never firesCI/security/scorecard triggers on main)
This is why PR #84 (release-please) was not getting its branch
auto-updated after other PRs merged.
Fix
Use the
patchloom-releaseApp token forgh pr merge --auto.Events from GitHub App tokens are NOT suppressed, so post-merge
triggers correctly.
Both the token generation and auto-merge steps are skipped for release
PRs (
patchloom-release[bot]author) so the maintainer controlsrelease timing.
Evidence