From d4afd19d31268de90cd6fff7460a1e40e6595558 Mon Sep 17 00:00:00 2001 From: Luca Giorgi Date: Sat, 15 Mar 2025 16:30:12 +0100 Subject: [PATCH] try adding +1 to review comment with gh api --- .github/workflows/add-remove-labels.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/add-remove-labels.yml b/.github/workflows/add-remove-labels.yml index 31a6fd705..1665ccb89 100644 --- a/.github/workflows/add-remove-labels.yml +++ b/.github/workflows/add-remove-labels.yml @@ -38,10 +38,18 @@ jobs: - name: Acknowledge the review with thumbs up reaction if: ${{ github.event.review }} - uses: peter-evans/create-or-update-comment@v4 - with: - comment-id: ${{ github.event.review.id }} - reactions: '+1' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REVIEW_COMMENT_ID: ${{ github.event.review.id }} + REPO_NAME: ${{ github.event.repository.name }} + REPO_OWNER: ${{ github.event.repository.owner.login }} + run: + gh api \ + --method POST \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + /repos/$REPO_OWNER/$REPO_NAME/pulls/comments/$REVIEW_COMMENT_ID/reactions \ + -f "content=+1" - uses: actions/checkout@v4