From 582e132624c2c256c96891c51ee5e542e46269d9 Mon Sep 17 00:00:00 2001 From: Shashwat Agrawal Date: Sat, 18 Apr 2026 22:16:43 +0530 Subject: [PATCH 1/3] chore(CI): better messages Signed-off-by: Shashwat Agrawal --- .github/workflows/discord.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/discord.yml b/.github/workflows/discord.yml index c60123c..e1d70ff 100644 --- a/.github/workflows/discord.yml +++ b/.github/workflows/discord.yml @@ -14,7 +14,6 @@ on: jobs: notify: runs-on: ubuntu-latest - # For PRs, only run if it was actually merged (not just closed) if: | github.event_name == 'push' || github.event_name == 'issues' || @@ -22,8 +21,13 @@ jobs: steps: - name: Send to Discord run: | + if [ "${{ github.event_name }}" == "pull_request" ]; 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 }}" + else + MESSAGE="Push to master\nPushed by: ${{ github.actor }}\nAuthor: ${{ github.event.head_commit.author.name }}\nCommit: ${{ github.event.head_commit.message }}" + fi curl -H "Content-Type: application/json" \ - -d "{ - \"content\": \"Repo update in ${{ github.repository }}\nEvent: ${{ github.event_name }}\nUser: ${{ github.actor }}\nBranch: ${{ github.ref_name }}\" - }" \ + -d "{\"content\": \"$MESSAGE\"}" \ ${{ secrets.DISCORD_WEBHOOK }} From 17fcf7d316719ba7f4dd208629ff7c4041e31197 Mon Sep 17 00:00:00 2001 From: Shashwat Agrawal Date: Sat, 18 Apr 2026 23:44:14 +0530 Subject: [PATCH 2/3] fix(CI): add PR opened event notify Signed-off-by: Shashwat Agrawal --- .github/workflows/discord.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/discord.yml b/.github/workflows/discord.yml index e1d70ff..360a53e 100644 --- a/.github/workflows/discord.yml +++ b/.github/workflows/discord.yml @@ -5,7 +5,7 @@ on: branches: - master pull_request: - types: [closed] + types: [closed, opened] branches: - master issues: @@ -17,11 +17,14 @@ jobs: if: | github.event_name == 'push' || github.event_name == 'issues' || - (github.event_name == 'pull_request' && github.event.pull_request.merged == true) + (github.event_name == 'pull_request' && github.event.pull_request.merged == true) || + (github.event_name == 'pull_request' && github.event.action == 'opened') steps: - name: Send to Discord run: | - if [ "${{ github.event_name }}" == "pull_request" ]; then + if [ "${{ github.event_name }}" == "pull_request" ] && [ "${{ 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 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 }}" From 07b9cbc955a74fb5a5c581414cd4a4bc2945aee2 Mon Sep 17 00:00:00 2001 From: Shashwat Agrawal Date: Sun, 19 Apr 2026 00:32:39 +0530 Subject: [PATCH 3/3] feat(CI): mention mods Signed-off-by: Shashwat Agrawal --- .github/workflows/discord.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/discord.yml b/.github/workflows/discord.yml index 360a53e..a0d90e1 100644 --- a/.github/workflows/discord.yml +++ b/.github/workflows/discord.yml @@ -32,5 +32,5 @@ jobs: MESSAGE="Push to master\nPushed by: ${{ github.actor }}\nAuthor: ${{ github.event.head_commit.author.name }}\nCommit: ${{ github.event.head_commit.message }}" fi curl -H "Content-Type: application/json" \ - -d "{\"content\": \"$MESSAGE\"}" \ + -d "{\"content\": \"<@&${{ secrets.DISCORD_ATOMIC_ROLE_ID }}> $MESSAGE\"}" \ ${{ secrets.DISCORD_WEBHOOK }}