Block a merge when the PR is marked as minor
This commit is contained in:
parent
6a1a17dd28
commit
a6d53e06fe
1 changed files with 17 additions and 0 deletions
17
.github/workflows/block-merge.yml
vendored
Normal file
17
.github/workflows/block-merge.yml
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
name: Block Merge
|
||||
|
||||
on: pull_request # run on pull request events
|
||||
|
||||
permissions:
|
||||
pull-requests: write # grant write permission on the pull-requests endpoint
|
||||
jobs:
|
||||
approve:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- run: | # approve the pull request
|
||||
curl --request POST \
|
||||
--url https://api.github.com/repos/${{github.repository}}/pulls/${{github.event.number}}/reviews \
|
||||
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
|
||||
--header 'content-type: application/json' \
|
||||
-d '{"event":"REQUEST_CHANGES"}'
|
Loading…
Add table
Reference in a new issue