Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 19 additions & 14 deletions .github/workflows/add-remove-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,25 @@ jobs:
comment-id: ${{ github.event.comment.id }}
reactions: '+1'

- name: Acknowledge the review with thumbs up reaction
if: ${{ github.event.review }}
env:
GH_TOKEN: ${{ secrets.OPENDATAHUB_TESTS_BOT_PAT }}
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"
# This currently fails with either the bot PAT or the standard github token secret
# gh: Insufficient scopes for reacting to this Pull Request Review Comment. (HTTP 403)
# {"message":"Insufficient scopes for reacting to this Pull Request Review Comment.","documentation_url":"https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-pull-request-review-comment","status":"403"}
# It could work if we had a token with the proper permissions.
# See https://github.com/peter-evans/create-or-update-comment/issues/392 for why the action above doesn't work.
# - name: Acknowledge the review with thumbs up reaction
# if: ${{ github.event.review }}
# env:
# GH_TOKEN: ${{ secrets.OPENDATAHUB_TESTS_BOT_PAT }}
# 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

Expand Down