From f68c296034b547dbc352497555fde34b40706f8d Mon Sep 17 00:00:00 2001 From: Cristiano Carvalho Date: Fri, 22 May 2026 08:58:46 -0300 Subject: [PATCH] chore: skip own PR Discord notifications Skip Discord notifications for pull request events when the PR author or sender is the configured ignored GitHub actor. This keeps PR notifications focused on activity from other users. --- .github/workflows/discord-notifications.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/discord-notifications.yml b/.github/workflows/discord-notifications.yml index 3edfcec..62c380b 100644 --- a/.github/workflows/discord-notifications.yml +++ b/.github/workflows/discord-notifications.yml @@ -20,6 +20,7 @@ jobs: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} ACTOR: ${{ github.actor }} EVENT_NAME: ${{ github.event_name }} + IGNORED_PR_ACTOR: ccarvalho-eng REPO: ${{ github.repository }} steps: @@ -39,6 +40,11 @@ jobs: ;; pull_request) action="$(jq -r '.action' "$GITHUB_EVENT_PATH")" + pr_author="$(jq -r '.pull_request.user.login' "$GITHUB_EVENT_PATH")" + sender="$(jq -r '.sender.login' "$GITHUB_EVENT_PATH")" + if [ "$pr_author" = "$IGNORED_PR_ACTOR" ] || [ "$sender" = "$IGNORED_PR_ACTOR" ]; then + exit 0 + fi title="$(jq -r '.pull_request.title' "$GITHUB_EVENT_PATH")" url="$(jq -r '.pull_request.html_url' "$GITHUB_EVENT_PATH")" label="New PR"