mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-15 09:24:52 +03:00
Create automerge pyup GitHub action
This commit is contained in:
parent
1a701ed70f
commit
407619c666
37
.github/workflows/automerge-pyup
vendored
Normal file
37
.github/workflows/automerge-pyup
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
name: "pyup Automerge"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
automerge:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
if: github.actor == 'pyup-bot'
|
||||
steps:
|
||||
- name: 'Wait for status checks'
|
||||
id: waitforstatuschecks
|
||||
uses: "WyriHaximus/github-action-wait-for-status@master"
|
||||
with:
|
||||
ignoreActions: automerge,WIP
|
||||
checkInterval: 300
|
||||
env:
|
||||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||
|
||||
- name: 'automerge'
|
||||
uses: actions/github-script@0.2.0
|
||||
if: steps.waitforstatuschecks.outputs.status == 'success'
|
||||
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}}
|
Loading…
Reference in New Issue
Block a user