Try again

This commit is contained in:
Matthew Phillips 2022-09-22 15:39:39 -04:00
parent a6d53e06fe
commit d37f02b80a

View file

@ -1,17 +1,21 @@
name: Block Merge
name: Check mergeability
on: pull_request # run on pull request events
# TODO
# 1. Check if there are minor changesets
# 2. Send PR disapproval
permissions:
pull-requests: write # grant write permission on the pull-requests endpoint
jobs:
approve:
check:
runs-on: ubuntu-latest
steps:
- run: | # approve the pull request
- name: Send PR review
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"}'
-d '{"event":"REQUEST_CHANGES","body":"This PR is blocked because it contains a `minor` changeset. A reviewer will merge this at the next release if approved."}'