Skip to content

Commit

Permalink
Add auto merge for dependabot
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobcreech committed Mar 12, 2022
1 parent b3c3663 commit 29b2bce
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/dependabotautomerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Dependabot Automerge - Action"

on:
pull_request:

jobs:
worker:
runs-on: ubuntu-latest

if: github.actor == 'dependabot[bot]'
steps:
- name: automerge
uses: actions/github-script@0.2.0
with:
script: |
github.pullRequests.createReview({
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
pull_number: context.payload.pull_request.number,
event: 'APPROVE'
})
github.pullRequests.merge({
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
pull_number: context.payload.pull_request.number
})
github-token: ${{github.token}}

0 comments on commit 29b2bce

Please sign in to comment.