Use dependabot via GitHub actions
This commit is contained in:
25
.github/workflows/dependabot.yml
vendored
Normal file
25
.github/workflows/dependabot.yml
vendored
Normal 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
|
||||
})
|
Reference in New Issue
Block a user