Make dependabot-automerge workflow reusable (workflow_call)#1
Merged
Conversation
Convert the org auto-merge workflow from an on: pull_request_target workflow (which only runs in the .github repo itself) into a reusable workflow. Other repos add a thin caller that triggers on pull_request_target and does 'uses: ...@main' with 'secrets: inherit', so the approve + auto-merge logic lives in one place. Behavior is unchanged (approve + enable auto-merge for patch/minor, comment + label needs-manual-review for major). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Update the caller example to include the Dependabot-actor guard and a default-branch restriction on pull_request_target. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
github.actor is the triggering user (can be a maintainer on a rebase/synchronize), so guard the job on github.event.pull_request.user.login instead. Update the caller example to match. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bbkrr
added a commit
that referenced
this pull request
Jul 1, 2026
GitHub's 'require workflows to pass' ruleset rejects a workflow_call-only
workflow ('must have merge_queue, pull_request_target, or pull_request').
Converting this to reusable (PR #1) broke the org dependabot-automerge
ruleset for every repo. Restore the direct pull_request_target trigger so
the org ruleset can inject and run it across repos as intended. Keeps the
PR-author guard.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bbkrr
added a commit
that referenced
this pull request
Jul 1, 2026
…-workflow-trigger Revert to pull_request_target: required workflows can't be reusable (fixes #1 regression)
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
Convert
.github/workflows/dependabot-automerge.yamlfrom anon: pull_request_targetworkflow into a reusable workflow (on: workflow_call).Why
A plain workflow in the org
.githubrepo only runs for the.githubrepo itself — it does not propagate to other repos. To share the approve + auto-merge logic org-wide, it must be a reusable workflow that other repos call.Target repos add a thin caller at
.github/workflows/dependabot-automerge.yaml:Behavior
Unchanged: approve + enable auto-merge (rebase) for patch/minor bumps; comment + label
needs-manual-reviewfor major bumps. Only the trigger changed (pull_request_target→workflow_call).Part of the org-wide Dependabot auto-merge rollout (realrate/RealRate-Private#2148).