From 38837e587b9cd9674e86ca6282368d07843cd541 Mon Sep 17 00:00:00 2001 From: Shahar Naveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Fri, 11 Jul 2025 02:35:21 +0300 Subject: [PATCH] Make `take` issue comment to use curl (#5937) * Revert "Add missing `@` for the "take" comment command (#5933)" This reverts commit ef385a9efa3d976e528015ddb8b47d7b6f589ced. * Fix `take` --- .github/workflows/comment-commands.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/comment-commands.yml b/.github/workflows/comment-commands.yml index 0d209fd67..0a5d48e90 100644 --- a/.github/workflows/comment-commands.yml +++ b/.github/workflows/comment-commands.yml @@ -13,12 +13,11 @@ jobs: group: ${{ github.actor }}-issue-assign permissions: - issues: write + issues: write steps: - - run: gh issue edit "${{ env.ISSUE_NUMBER }}" --add-assignee "@${{ env.USER_LOGIN }}" - env: - ISSUE_NUMBER: ${{ github.event.issue.number }} - USER_LOGIN: ${{ github.event.comment.user.login }} - GH_TOKEN: ${{ github.token }} - GH_REPO: ${{ github.repository }} + # Using REST API and not `gh issue edit`. https://github.com/cli/cli/issues/6235#issuecomment-1243487651 + - run: curl \ + -H "Authorization: token ${{ github.token }}" \ + -d '{"assignees": ["${{ github.event.comment.user.login }}"]}' \ + https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees