From b39df7c58ee3bce0e6b5fa4bda2f5e0363e3b395 Mon Sep 17 00:00:00 2001 From: Ethan Coon Date: Sun, 11 Oct 2026 15:33:36 -0400 Subject: [PATCH 1/6] Only messages on PR creation, no ping --- .github/workflows/discord-pr.yml | 53 ++++++++++++-------------------- 1 file changed, 20 insertions(+), 33 deletions(-) diff --git a/.github/workflows/discord-pr.yml b/.github/workflows/discord-pr.yml index b6c485d..ff13584 100644 --- a/.github/workflows/discord-pr.yml +++ b/.github/workflows/discord-pr.yml @@ -4,20 +4,10 @@ on: pull_request: types: - opened - - reopened - - ready_for_review jobs: discord-notification: - if: > - github.event.action == 'ready_for_review' || - ( - github.event.pull_request.draft == false && - ( - github.event.action == 'opened' || - github.event.action == 'reopened' - ) - ) + if: github.event.pull_request.draft == false runs-on: ubuntu-latest @@ -25,7 +15,6 @@ jobs: - name: Send Discord PR notification env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_PR_WEBHOOK }} - DISCORD_ROLE_ID: ${{ secrets.DISCORD_PR_REVIEW_ROLE }} REPO_NAME: ${{ github.event.repository.name }} REPO_URL: ${{ github.event.repository.html_url }} @@ -73,7 +62,6 @@ jobs: deletions = os.environ["DELETIONS"] changed_files = os.environ["CHANGED_FILES"] - role = os.environ["DISCORD_ROLE_ID"] webhook = os.environ["DISCORD_WEBHOOK"] event_action = os.environ["EVENT_ACTION"] @@ -117,26 +105,25 @@ jobs: } ] - payload = { - "content": f"<@&{role}> — PR ready for review", - "allowed_mentions": { - "roles": [role], - "parse": [] - }, - "embeds": [ - { - "title": f"🔀 {repo} #{number} — {title}", - "url": url, - "description": f"PR #{number} is ready for review.", - "author": { - "name": author, - "icon_url": avatar - }, - "fields": fields - } - ] - } - + payload = { + "content": "New pull request opened!", + "allowed_mentions": { + "parse": [] + }, + "embeds": [ + { + "title": f"🔀 {repo} #{number} — {title}", + "url": url, + "description": f"PR #{number} is ready for review.", + "author": { + "name": author, + "icon_url": avatar + }, + "fields": fields + } + ] + } + data = json.dumps(payload).encode("utf-8") request = urllib.request.Request( From c62f204df7d66f76b0a60ac2c35cfbf841396e4c Mon Sep 17 00:00:00 2001 From: Ethan Coon Date: Sun, 11 Oct 2026 15:57:13 -0400 Subject: [PATCH 2/6] Fix --- .github/workflows/discord-pr.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/discord-pr.yml b/.github/workflows/discord-pr.yml index ff13584..49335aa 100644 --- a/.github/workflows/discord-pr.yml +++ b/.github/workflows/discord-pr.yml @@ -114,7 +114,7 @@ jobs: { "title": f"🔀 {repo} #{number} — {title}", "url": url, - "description": f"PR #{number} is ready for review.", + "description": f"PR #{number} has been opened.", "author": { "name": author, "icon_url": avatar @@ -122,8 +122,8 @@ jobs: "fields": fields } ] - } - + } + data = json.dumps(payload).encode("utf-8") request = urllib.request.Request( From 8df401c126bb614b60b3d50d72d0b1e7d07c8f94 Mon Sep 17 00:00:00 2001 From: Ethan Coon Date: Mon, 12 Oct 2026 15:02:07 -0400 Subject: [PATCH 3/6] test part 2 --- .github/workflows/discord-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/discord-pr.yml b/.github/workflows/discord-pr.yml index 49335aa..426a3b9 100644 --- a/.github/workflows/discord-pr.yml +++ b/.github/workflows/discord-pr.yml @@ -4,6 +4,7 @@ on: pull_request: types: - opened + - synchronize jobs: discord-notification: @@ -106,7 +107,6 @@ jobs: ] payload = { - "content": "New pull request opened!", "allowed_mentions": { "parse": [] }, From 0216dbaf71d4659f9982c559fb549e80b7f25ad6 Mon Sep 17 00:00:00 2001 From: Ethan Coon Date: Mon, 12 Oct 2026 15:04:52 -0400 Subject: [PATCH 4/6] test 3 --- .github/workflows/discord-pr.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/discord-pr.yml b/.github/workflows/discord-pr.yml index 426a3b9..966e116 100644 --- a/.github/workflows/discord-pr.yml +++ b/.github/workflows/discord-pr.yml @@ -5,7 +5,7 @@ on: types: - opened - synchronize - + jobs: discord-notification: if: github.event.pull_request.draft == false @@ -107,6 +107,7 @@ jobs: ] payload = { + "content": "", "allowed_mentions": { "parse": [] }, From c4bd78f14d355d750a317f78b72aca0ca26c7a45 Mon Sep 17 00:00:00 2001 From: Ethan Coon Date: Mon, 12 Oct 2026 15:29:04 -0400 Subject: [PATCH 5/6] fix --- .github/workflows/discord-pr.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/discord-pr.yml b/.github/workflows/discord-pr.yml index 966e116..d209193 100644 --- a/.github/workflows/discord-pr.yml +++ b/.github/workflows/discord-pr.yml @@ -106,9 +106,9 @@ jobs: } ] - payload = { - "content": "", - "allowed_mentions": { + payload = { + "content": "", + "allowed_mentions": { "parse": [] }, "embeds": [ From 50935ab43b69f0ec88a07e4773bb64f0a7255744 Mon Sep 17 00:00:00 2001 From: Ethan Coon Date: Mon, 12 Oct 2026 15:30:11 -0400 Subject: [PATCH 6/6] Fixed --- .github/workflows/discord-pr.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/discord-pr.yml b/.github/workflows/discord-pr.yml index d209193..19af8b9 100644 --- a/.github/workflows/discord-pr.yml +++ b/.github/workflows/discord-pr.yml @@ -4,7 +4,6 @@ on: pull_request: types: - opened - - synchronize jobs: discord-notification: