From c9cb8119e49b5fa0e252958b2f39a8c5f7ae7eb3 Mon Sep 17 00:00:00 2001 From: chiperi Date: Sat, 10 Jan 2026 17:30:47 +0100 Subject: [PATCH] Added discord-pr.yml --- .github/workflows/discord-pr.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/discord-pr.yml diff --git a/.github/workflows/discord-pr.yml b/.github/workflows/discord-pr.yml new file mode 100644 index 0000000..c105335 --- /dev/null +++ b/.github/workflows/discord-pr.yml @@ -0,0 +1,27 @@ +name: Discord - PR notification + +on: + pull_request: + types: [opened, reopened, ready_for_review] + +jobs: + notify: + runs-on: ubuntu-20.04 + steps: + - name: Send Discord message + env: + DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} + PR_TITLE: ${{ github.event.pull_request.title }} + PR_URL: ${{ github.event.pull_request.html_url }} + PR_AUTHOR: ${{ github.event.pull_request.user.login }} + PR_BASE: ${{ github.event.pull_request.base.ref }} + PR_HEAD: ${{ github.event.pull_request.head.ref }} + REPO: ${{ github.repository }} + run: | + payload=$(cat < $PR_BASE**\n$PR_URL" + } + EOF + ) + curl -H "Content-Type: application/json" -d "$payload" "$DISCORD_WEBHOOK_URL" \ No newline at end of file