Use dependabot via GitHub actions

This commit is contained in:
Sebastian Serth
2020-12-07 18:26:09 +01:00
parent 5f02b8aadb
commit fa2748aec4
2 changed files with 47 additions and 0 deletions

25
.github/workflows/dependabot.yml vendored Normal file
View File

@ -0,0 +1,25 @@
name: Dependabot Automerge Check
on:
- pull_request
jobs:
worker:
runs-on: ubuntu-latest
steps:
- name: Automerge dependabot dependencies
uses: actions/github-script@v3
if: github.actor == 'dependabot[bot]'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
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
})