ci: correctly update comment (#6760)

* ci: correctly update comment

* fix: restore action to change PR status
This commit is contained in:
Emanuele Stoppa 2023-04-06 15:29:55 +01:00 committed by GitHub
parent 52d7a4a011
commit 32b7158bdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,12 +62,30 @@ jobs:
--header 'content-type: application/json' \
-d '["semver minor"]'
- name: Find Comment
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ github.event.number }}
comment-author: 'github-actions[bot]'
- name: Send PR review
if: steps.find-blockers.outputs.found == 'true'
uses: peter-evans/create-or-update-comment@v2
uses: peter-evans/create-or-update-comment@v3
continue-on-error: true
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.number }}
body: |
This PR is blocked because it contains a `minor` changeset. A reviewer will merge this at the next release if approved.
edit-mode: replace
- name: Change PR status
if: steps.find-blockers.outputs.found == 'true'
run: |
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"}'