Skip to content

Commit 219af1c

Browse files
authored
Merge pull request #1288 from peterbecich/auto-approve-dependabot
auto-approve Dependabot
2 parents 1daf748 + 9540c0c commit 219af1c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#approve-a-pull-request
2+
name: Dependabot auto-approve
3+
on: pull_request
4+
5+
permissions:
6+
pull-requests: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
if: github.actor == 'dependabot[bot]'
12+
steps:
13+
- name: Dependabot metadata
14+
id: metadata
15+
uses: dependabot/fetch-metadata@v1
16+
with:
17+
github-token: "${{ secrets.GITHUB_TOKEN }}"
18+
- name: Approve a PR
19+
run: gh pr review --approve "$PR_URL"
20+
env:
21+
PR_URL: ${{github.event.pull_request.html_url}}
22+
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)