Skip to content

Commit

Permalink
Enable auto-approve for Dependabot PRs (#142)
Browse files Browse the repository at this point in the history
Required for auto-merge.

Signed-off-by: Antonin Bas <[email protected]>
  • Loading branch information
antoninbas authored Oct 16, 2023
1 parent 9134d78 commit 81ed2b7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/dependabot_automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-approve for npm Dependabot PRs (except major updates)
if: ${{ steps.metadata.outputs.package-ecosystem == 'npm_and_yarn' && steps.metadata.outputs.update-type != 'version-update:semver-major' }}
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Enable auto-merge for npm Dependabot PRs (except major updates)
if: ${{ steps.metadata.outputs.package-ecosystem == 'npm_and_yarn' && steps.metadata.outputs.update-type != 'version-update:semver-major' }}
run: gh pr merge --auto --squash "$PR_URL"
Expand Down

0 comments on commit 81ed2b7

Please sign in to comment.