Update and rename archive-discord-thread.yml to delete-discord-thread.yml

This commit is contained in:
Bas van den Berg 2025-03-17 13:41:37 +01:00 committed by GitHub
parent 18c511abcf
commit dd68bbceee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,4 @@
name: Archive Discord Thread on GitHub Issue Closure
name: Delete Discord Thread on GitHub Issue Closure
on:
issues:
@ -21,13 +21,8 @@ jobs:
if [ -n "$THREAD_ID" ]; then
echo "Thread found: $THREAD_ID. Archiving..."
curl -X PATCH "https://discord.com/api/v10/channels/$THREAD_ID" \
-H "Authorization: Bot ${{ secrets.DISCORD_BOT_TOKEN }}" \
-H "Content-Type: application/json" \
-d '{
"archived": true,
"locked": true
}'
curl -X DELETE "https://discord.com/api/v10/channels/$THREAD_ID" \
-H "Authorization: Bot ${{ secrets.DISCORD_BOT_TOKEN }}"
else
echo "No thread found for issue: $ISSUE_TITLE"
fi