Skip to content

Commit

Permalink
feat: enable the auto-merge feature on dependabot prs
Browse files Browse the repository at this point in the history
    - so we only have to approve them
    - enables the github feature auto-merge
    - only add this if tests pass

Signed-off-by: Robert Waffen <rwaffen@gmail.com>
  • Loading branch information
rwaffen committed Sep 6, 2024
1 parent f078b32 commit a5555b2
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,24 @@ jobs:
name: Test suite
steps:
- run: echo Test suite completed

dependabot:
permissions:
contents: write
name: 'Dependabot auto-merge'
needs:
- tests
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2.2.0
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'

- 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.GITHUB_TOKEN}}

0 comments on commit a5555b2

Please sign in to comment.