File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Dependabot Auto-Approve
2+
3+ on :
4+ pull_request_target : # Use pull_request_target to get write permissions for approval
5+ types :
6+ - opened
7+ - synchronize
8+ - reopened
9+
10+ permissions :
11+ pull-requests : write # Needed to approve PRs
12+
13+ jobs :
14+ auto-approve :
15+ runs-on : ubuntu-latest
16+ # Only run for PRs authored by dependabot[bot]
17+ if : github.actor == 'dependabot[bot]' || github.actor == 'dependabot'
18+ steps :
19+ - name : Checkout code (not strictly necessary for just approval)
20+ uses : actions/checkout@v4
21+ # no further steps needed for just approval
22+
23+ - name : Auto-approve Dependabot PR
24+ run : |
25+ gh pr review --approve "$PR_URL"
26+ echo "Approved Dependabot PR: $PR_URL"
27+ env :
28+ GH_TOKEN : ${{ github.token }}
29+ PR_URL : ${{ github.event.pull_request.html_url }}
You can’t perform that action at this time.
0 commit comments