Update create-discord-thread.yml

This commit is contained in:
Bas van den Berg 2025-03-18 16:36:01 +01:00 committed by GitHub
parent 4d26de5d8e
commit 667a7422cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,6 +4,9 @@ on:
issues: issues:
types: types:
- labeled - labeled
permissions:
issues: write
jobs: jobs:
post_to_discord: post_to_discord:
@ -101,3 +104,13 @@ jobs:
echo "Failed to create Discord post! Status code: $STATUS_CODE" echo "Failed to create Discord post! Status code: $STATUS_CODE"
exit 1 exit 1
fi fi
- name: Comment on Issue
id: comment_on_issue
env:
MESSAGE: ${{ env.message }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo -e "$MESSAGE" > comment.txt
sed -i '/Discussion & issue tracking:/,$d' comment.txt
gh issue comment ${{ github.event.issue.number }} --repo ${{ github.repository }} --body-file comment.txt