Can't automerge with branch protection
This commit is contained in:
parent
849d1c01b1
commit
551f7d8a6c
|
@ -1,46 +0,0 @@
|
||||||
name: automerge
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- labeled
|
|
||||||
- unlabeled
|
|
||||||
- synchronize
|
|
||||||
- unlocked
|
|
||||||
check_suite:
|
|
||||||
types:
|
|
||||||
- completed
|
|
||||||
status: {}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
dependabot:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Approve
|
|
||||||
uses: actions/github-script@0.9.0
|
|
||||||
with:
|
|
||||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
|
||||||
script: |
|
|
||||||
await github.pulls.createReview({
|
|
||||||
owner: context.payload.repository.owner.login,
|
|
||||||
repo: context.payload.repository.name,
|
|
||||||
pull_number: context.payload.pull_request.number,
|
|
||||||
event: 'APPROVE'
|
|
||||||
})
|
|
||||||
-
|
|
||||||
name: Wait
|
|
||||||
run: sleep 3
|
|
||||||
-
|
|
||||||
name: Merge
|
|
||||||
uses: actions/github-script@0.9.0
|
|
||||||
with:
|
|
||||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
|
||||||
script: |
|
|
||||||
await github.pulls.merge({
|
|
||||||
owner: context.payload.repository.owner.login,
|
|
||||||
repo: context.payload.repository.name,
|
|
||||||
pull_number: context.payload.pull_request.number,
|
|
||||||
merge_method: 'squash'
|
|
||||||
})
|
|
Loading…
Reference in New Issue