From a3819f61a50c41039ad57a66ff6c8f0377a67190 Mon Sep 17 00:00:00 2001 From: ShaharNaveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Thu, 10 Jul 2025 17:56:32 +0300 Subject: [PATCH 1/2] Revert "Add missing `@` for the "take" comment command (#5933)" This reverts commit ef385a9efa3d976e528015ddb8b47d7b6f589ced. --- .github/workflows/comment-commands.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/comment-commands.yml b/.github/workflows/comment-commands.yml index 0d209fd676f..2b2a1caefe8 100644 --- a/.github/workflows/comment-commands.yml +++ b/.github/workflows/comment-commands.yml @@ -16,7 +16,7 @@ jobs: issues: write steps: - - run: gh issue edit "${{ env.ISSUE_NUMBER }}" --add-assignee "@${{ env.USER_LOGIN }}" + - 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 }} From 624cd4cbd7832fb8151a681f5a930eefee6e1d04 Mon Sep 17 00:00:00 2001 From: ShaharNaveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Thu, 10 Jul 2025 18:29:13 +0300 Subject: [PATCH 2/2] 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 2b2a1caefe8..0a5d48e9035 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