Skip to content

Commit 38837e5

Browse files
authored
Make take issue comment to use curl (#5937)
* Revert "Add missing `@` for the "take" comment command (#5933)" This reverts commit ef385a9. * Fix `take`
1 parent 089c39f commit 38837e5

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

.github/workflows/comment-commands.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@ jobs:
1313
group: ${{ github.actor }}-issue-assign
1414

1515
permissions:
16-
issues: write
16+
issues: write
1717

1818
steps:
19-
- run: gh issue edit "${{ env.ISSUE_NUMBER }}" --add-assignee "@${{ env.USER_LOGIN }}"
20-
env:
21-
ISSUE_NUMBER: ${{ github.event.issue.number }}
22-
USER_LOGIN: ${{ github.event.comment.user.login }}
23-
GH_TOKEN: ${{ github.token }}
24-
GH_REPO: ${{ github.repository }}
19+
# Using REST API and not `gh issue edit`. https://github.com/cli/cli/issues/6235#issuecomment-1243487651
20+
- run: curl \
21+
-H "Authorization: token ${{ github.token }}" \
22+
-d '{"assignees": ["${{ github.event.comment.user.login }}"]}' \
23+
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees

0 commit comments

Comments
 (0)