From 667a7422cfe7b59b9ce523d2fe6360585267d3fe Mon Sep 17 00:00:00 2001 From: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com> Date: Tue, 18 Mar 2025 16:36:01 +0100 Subject: [PATCH] Update create-discord-thread.yml --- .github/workflows/create-discord-thread.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/create-discord-thread.yml b/.github/workflows/create-discord-thread.yml index 7b958029d..1a5589851 100644 --- a/.github/workflows/create-discord-thread.yml +++ b/.github/workflows/create-discord-thread.yml @@ -4,6 +4,9 @@ on: issues: types: - labeled + +permissions: + issues: write jobs: post_to_discord: @@ -101,3 +104,13 @@ jobs: echo "Failed to create Discord post! Status code: $STATUS_CODE" exit 1 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