From 602ba9806f2dcc81aa462f993ad223c9324944e7 Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Sat, 24 Dec 2022 15:16:45 +0100 Subject: [PATCH] chore(discord): strip headers from changelog --- .github/workflows/discord.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/discord.yml b/.github/workflows/discord.yml index 5f0300a1..f6aff67c 100644 --- a/.github/workflows/discord.yml +++ b/.github/workflows/discord.yml @@ -7,6 +7,18 @@ jobs: notify: runs-on: ubuntu-latest steps: + - name: Notes 📝 + id: notes + uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 + with: + result-encoding: string + script: | + notes = context.payload.release.body + + // replace all non-supported characters + notes = notes.replaceAll('###', + notes = notes.trim() + return notes - name: Changelog 📝 uses: sebastianpopp/discord-action@ba18c5aaa871acf97620c349fd76a187550f12eb with: @@ -14,6 +26,6 @@ jobs: message: | 📦 ${{ github.event.release.name }} - ${{ github.event.release.body }} + ${{steps.notes.outputs.result}} ${{ github.event.release.html_url }}