Skip to content

fix(ci): trigger release PR auto-merge via workflow_run instead of pull_request - #178

Open
sebastiancorrea81 wants to merge 1 commit into
mainfrom
fix/auto-merge-workflow-run-trigger
Open

fix(ci): trigger release PR auto-merge via workflow_run instead of pull_request#178
sebastiancorrea81 wants to merge 1 commit into
mainfrom
fix/auto-merge-workflow-run-trigger

Conversation

@sebastiancorrea81

Copy link
Copy Markdown

Problem

auto-merge-release-pr intermittently gets blocked with action_required and 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

  • Merge this PR.
  • Wait for the next chart fix/feat PR to merge, and confirm `auto-merge-release-pr` fires via `workflow_run` and merges the release PR without any `action_required`/manual nudge.

🤖 Generated with Claude Code

…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant