From 83f3d9ab956f21bad923e8ebd7cf1ad7a3845c40 Mon Sep 17 00:00:00 2001 From: Shashwat Agrawal Date: Sun, 19 Apr 2026 16:59:07 +0530 Subject: [PATCH] fix(CI): fork PR's weren't getting notified Signed-off-by: Shashwat Agrawal --- .github/workflows/discord.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/discord.yml b/.github/workflows/discord.yml index e0915e9..3ce1db9 100644 --- a/.github/workflows/discord.yml +++ b/.github/workflows/discord.yml @@ -1,7 +1,7 @@ name: Notify Discord on: - pull_request: + pull_request_target: types: [closed, opened] branches: - master @@ -13,17 +13,17 @@ jobs: runs-on: ubuntu-latest if: | github.event_name == 'issues' || - (github.event_name == 'pull_request' && github.event.pull_request.merged == true) || - (github.event_name == 'pull_request' && github.event.action == 'opened') + (github.event_name == 'pull_request_target' && github.event.pull_request.merged == true) || + (github.event_name == 'pull_request_target' && github.event.action == 'opened') steps: - name: Send to Discord env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} DISCORD_ATOMIC_ROLE_ID: ${{ secrets.DISCORD_ATOMIC_ROLE_ID }} run: | - if [ "${{ github.event_name }}" == "pull_request" ] && [ "${{ github.event.action }}" == "opened" ]; then + if [ "${{ github.event_name }}" == "pull_request_target" ] && [ "${{ github.event.action }}" == "opened" ]; then MESSAGE="PR Opened\nPR: ${{ github.event.pull_request.html_url }}\nTitle: ${{ github.event.pull_request.title }}\nRaised by: ${{ github.event.pull_request.user.login }}" - elif [ "${{ github.event_name }}" == "pull_request" ] && [ "${{ github.event.action }}" == "closed" ]; then + elif [ "${{ github.event_name }}" == "pull_request_target" ] && [ "${{ github.event.action }}" == "closed" ]; then MESSAGE="PR Merged\nPR: ${{ github.event.pull_request.html_url }}\nTitle: ${{ github.event.pull_request.title }}\nRaised by: ${{ github.event.pull_request.user.login }}\nMerged by: ${{ github.event.pull_request.merged_by.login }}" elif [ "${{ github.event_name }}" == "issues" ]; then MESSAGE="New Issue\nIssue: ${{ github.event.issue.html_url }}\nTitle: ${{ github.event.issue.title }}\nRaised by: ${{ github.actor }}"