diff --git a/.github/workflows/block-merge.yml b/.github/workflows/block-merge.yml index b680bfa89..06c65369d 100644 --- a/.github/workflows/block-merge.yml +++ b/.github/workflows/block-merge.yml @@ -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."}'