fix(ci): trigger release PR auto-merge via workflow_run instead of pull_request - #178
Open
sebastiancorrea81 wants to merge 1 commit into
Open
fix(ci): trigger release PR auto-merge via workflow_run instead of pull_request#178sebastiancorrea81 wants to merge 1 commit into
sebastiancorrea81 wants to merge 1 commit into
Conversation
…ll_request The release PR is opened by github-actions[bot], whose author_association on this repo is CONTRIBUTOR rather than MEMBER/COLLABORATOR -- enough to intermittently trigger GitHub's outside-collaborator approval gate on pull_request-triggered runs. Observed on PR #174 and #177 (two consecutive action_required runs each time, needing a manual label toggle to retry). Same fix already applied and verified on nullplatform/tofu-modules' auto-merge-release.yml: switch to workflow_run, which isn't subject to that gate, and resolve the PR via the REST API since workflow_run doesn't carry pull_request context. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
auto-merge-release-printermittently gets blocked withaction_requiredand zero jobs run, on the release-please PR specifically -- observed twice each on PR #174 and #177, needing a manual label toggle (remove/re-add `autorelease: pending`) to force a retry that succeeds.Root cause: the release PR is opened by `github-actions[bot]` via the default token, whose `author_association` on this repo is `CONTRIBUTOR` rather than `MEMBER`/`COLLABORATOR` -- enough for GitHub's "require approval for outside collaborators" gate to sometimes treat its `pull_request`-triggered runs as needing manual approval, even though the branch isn't a fork.
Fix
Same fix already applied and verified end-to-end on nullplatform/tofu-modules: switch the trigger from `pull_request` to `workflow_run` (on `"Release Charts"` completing), which isn't subject to that gate. Since `workflow_run` doesn't carry PR context, a `find-pr` job resolves the open release PR itself (via the REST API, to correctly match `github-actions[bot]`'s login format) and validates its author/label before calling the reusable workflow with `pr_number`.
Test plan
🤖 Generated with Claude Code