From 7440f86d2d00f8a481f67a31fbc21d4f7dee7c8a Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Sat, 1 Feb 2025 23:39:44 -0500 Subject: [PATCH 1/3] Create discord-pr-notify.yml --- .github/workflows/discord-pr-notify.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/discord-pr-notify.yml diff --git a/.github/workflows/discord-pr-notify.yml b/.github/workflows/discord-pr-notify.yml new file mode 100644 index 0000000..27da260 --- /dev/null +++ b/.github/workflows/discord-pr-notify.yml @@ -0,0 +1,17 @@ +on: + pull_request: + types: [opened] + +jobs: + notify: + runs-on: ubuntu-latest + steps: + - name: Send Discord Notification + uses: Ilshidur/action-discord@master + with: + args: | + 🚀 **New Pull Request Opened!** + 🔗 [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }}) + 👤 **Author:** ${{ github.event.pull_request.user.login }} + env: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} From 1d81d871bff27c3c14d1f6c1a09b9192b05892dd Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Sat, 1 Feb 2025 23:56:14 -0500 Subject: [PATCH 2/3] Try a link without a preview --- .github/workflows/discord-pr-notify.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/discord-pr-notify.yml b/.github/workflows/discord-pr-notify.yml index 27da260..8fdc952 100644 --- a/.github/workflows/discord-pr-notify.yml +++ b/.github/workflows/discord-pr-notify.yml @@ -1,3 +1,5 @@ +name: Discord PR Notifier + on: pull_request: types: [opened] @@ -11,7 +13,8 @@ jobs: with: args: | 🚀 **New Pull Request Opened!** - 🔗 [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }}) + 📝 **Title:** ${{ github.event.pull_request.title }} + 🔗 <${{ github.event.pull_request.html_url }}> 👤 **Author:** ${{ github.event.pull_request.user.login }} env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} From 58111432da05aa4920ebf82bf748d906452f53c9 Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Sun, 2 Feb 2025 00:04:27 -0500 Subject: [PATCH 3/3] Make runnable on workflow dispatch --- .github/workflows/discord-pr-notify.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/discord-pr-notify.yml b/.github/workflows/discord-pr-notify.yml index 8fdc952..9546445 100644 --- a/.github/workflows/discord-pr-notify.yml +++ b/.github/workflows/discord-pr-notify.yml @@ -1,6 +1,7 @@ name: Discord PR Notifier on: + workflow_dispatch: pull_request: types: [opened]