diff --git a/.github/workflows/notify-discord.yml b/.github/workflows/notify-discord.yml index 317380e..2b84029 100644 --- a/.github/workflows/notify-discord.yml +++ b/.github/workflows/notify-discord.yml @@ -12,7 +12,8 @@ jobs: env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} run: | - echo '{ + curl -X POST -H "Content-Type: application/json" \ + -d '{ "embeds": [{ "title": "📣 Nouvelle Pull Request : ${{ github.event.pull_request.title }}", "url": "${{ github.event.pull_request.html_url }}", @@ -21,7 +22,6 @@ jobs: "url": "https://github.com/${{ github.actor }}", "icon_url": "https://avatars.githubusercontent.com/${{ github.actor }}" }, - "description": "'"${{ github.event.pull_request.body }}"'", "timestamp": "${{ github.event.pull_request.created_at }}", "footer": { "text": "${{ github.repository }}" @@ -40,9 +40,5 @@ jobs: } ] }] - }' > payload.json - - curl -X POST -H "Content-Type: application/json" \ - -d @payload.json \ - $DISCORD_WEBHOOK - + }' \ + $DISCORD_WEBHOOK