Skip to content

Commit f6656e6

Browse files
committed
ci(bot): add unassign command
1 parent b2a6d74 commit f6656e6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/comment-commands.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,21 @@ jobs:
1818
- run: |
1919
echo "Assigning issue ${{ github.event.issue.number }} to ${{ github.event.comment.user.login }}"
2020
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"assignees": ["${{ github.event.comment.user.login }}"]}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees
21+
issue_unassign:
22+
runs-on: ubuntu-24.04
23+
if: (!github.event.issue.pull_request) && github.event.comment.body == 'unassign'
24+
concurrency:
25+
group: ${{ github.actor }}-issue-unassign
26+
steps:
27+
- run: |
28+
echo "Removing ${{ github.event.comment.user.login }} from issue ${{ github.event.issue.number }} assignees"
29+
curl -L \
30+
-X DELETE \
31+
-H "Accept: application/vnd.github+json" \
32+
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
33+
-H "X-GitHub-Api-Version: 2022-11-28" \
34+
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees \
35+
-d '{"assignees": ["${{ github.event.comment.user.login }}"]}'
2136
preview_docs:
2237
runs-on: ubuntu-24.04
2338
if: github.event.issue.pull_request && github.event.comment.body == '/preview'

0 commit comments

Comments
 (0)