Skip to content

Commit

Permalink
Auto merge dependabot PRs that pass CI checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark committed Nov 24, 2020
1 parent f9b589a commit d678d07
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/dependabot.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 d678d07

Please sign in to comment.