Skip to content

Add workflow to auto-merge Dependabot PRs - #278

Merged
schlarpc merged 3 commits into
mainfrom
claude/auto-merge-dependabot-prs-TCyQD
Apr 13, 2026
Merged

schlarpc merged 3 commits into
mainfrom
claude/auto-merge-dependabot-prs-TCyQD

Conversation

@schlarpc

Copy link
Copy Markdown
Owner

Uses pull_request_target to get write permissions without exposing
secrets to PR code (no checkout step). Approves the PR and enables
GitHub auto-merge, which waits for all required status checks to
pass before merging.

https://claude.ai/code/session_01UWiK5bH6Be6vft43zVVNbH

claude added 3 commits April 13, 2026 11:49
Uses pull_request_target to get write permissions without exposing
secrets to PR code (no checkout step). Approves the PR and enables
GitHub auto-merge, which waits for all required status checks to
pass before merging.

https://claude.ai/code/session_01UWiK5bH6Be6vft43zVVNbH
The auto-merge workflow requires repo settings (allow auto-merge,
branch protection) that can't be codified in files. Exclude it from
the template so generated repos don't ship with a broken workflow.

https://claude.ai/code/session_01UWiK5bH6Be6vft43zVVNbH
Instead of pull_request_target + --auto (which requires branch
protection and the "Allow auto-merge" repo setting), trigger on
workflow_run after the Test workflow succeeds. This merges directly
once tests pass, with no repo settings required.

Security: workflow_run always runs base branch code, never checks
out PR code, and the PR author is verified both via the event actor
and a redundant API check.

https://claude.ai/code/session_01UWiK5bH6Be6vft43zVVNbH
@schlarpc
schlarpc merged commit 4e2843d into main Apr 13, 2026
2 checks passed
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.

2 participants