Skip to content

Commit

Permalink
Add dependabot reviewer (#1275)
Browse files Browse the repository at this point in the history
  • Loading branch information
wirednkod authored Aug 24, 2023
1 parent 3bd28ae commit ee56564
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/dependabot-reviewer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Dependabot reviewer

on: pull_request_target

permissions:
pull-requests: write
contents: write

jobs:
review-dependabot-pr:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/[email protected]
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.DEPENDABOT_TOKEN}}
- name: Approve patch updates
if: ${{steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr review $PR_URL --approve -b "I'm **approving** this pull request because **it includes a patch update**"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.DEPENDABOT_TOKEN}}

0 comments on commit ee56564

Please sign in to comment.