summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Emanuele Stoppa <my.burning@gmail.com> 2023-04-06 15:29:55 +0100
committerGravatar GitHub <noreply@github.com> 2023-04-06 10:29:55 -0400
commit32b7158bdb25b308d4dbd2e9fb2acfe622649757 (patch)
treefacc89364b693b57e5a57b7b96f0138c4a9771cd
parent52d7a4a011a3bb722b522fffd88c5fe9a519a196 (diff)
downloadastro-32b7158bdb25b308d4dbd2e9fb2acfe622649757.tar.gz
astro-32b7158bdb25b308d4dbd2e9fb2acfe622649757.tar.zst
astro-32b7158bdb25b308d4dbd2e9fb2acfe622649757.zip
ci: correctly update comment (#6760)
* ci: correctly update comment * fix: restore action to change PR status
-rw-r--r--.github/workflows/check-merge.yml20
1 files changed, 19 insertions, 1 deletions
diff --git a/.github/workflows/check-merge.yml b/.github/workflows/check-merge.yml
index ba1758164..14d1900e3 100644
--- a/.github/workflows/check-merge.yml
+++ b/.github/workflows/check-merge.yml
@@ -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"}'
+