Update and rename archive-discord-thread.yml to delete-discord-thread.yml
This commit is contained in:
parent
18c511abcf
commit
dd68bbceee
@ -1,4 +1,4 @@
|
|||||||
name: Archive Discord Thread on GitHub Issue Closure
|
name: Delete Discord Thread on GitHub Issue Closure
|
||||||
|
|
||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
@ -21,13 +21,8 @@ jobs:
|
|||||||
|
|
||||||
if [ -n "$THREAD_ID" ]; then
|
if [ -n "$THREAD_ID" ]; then
|
||||||
echo "Thread found: $THREAD_ID. Archiving..."
|
echo "Thread found: $THREAD_ID. Archiving..."
|
||||||
curl -X PATCH "https://discord.com/api/v10/channels/$THREAD_ID" \
|
curl -X DELETE "https://discord.com/api/v10/channels/$THREAD_ID" \
|
||||||
-H "Authorization: Bot ${{ secrets.DISCORD_BOT_TOKEN }}" \
|
-H "Authorization: Bot ${{ secrets.DISCORD_BOT_TOKEN }}"
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-d '{
|
|
||||||
"archived": true,
|
|
||||||
"locked": true
|
|
||||||
}'
|
|
||||||
else
|
else
|
||||||
echo "No thread found for issue: $ISSUE_TITLE"
|
echo "No thread found for issue: $ISSUE_TITLE"
|
||||||
fi
|
fi
|
Loading…
x
Reference in New Issue
Block a user