From b0bf5e0bfd9ec2e62ee0e5abca7fb603bd667d5c Mon Sep 17 00:00:00 2001 From: Pranshul Date: Thu, 21 Nov 2024 19:23:22 +0530 Subject: [PATCH] Update discord.yml Signed-off-by: Pranshul --- .github/workflows/discord.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/discord.yml b/.github/workflows/discord.yml index 657751a9..da3fac75 100644 --- a/.github/workflows/discord.yml +++ b/.github/workflows/discord.yml @@ -17,7 +17,7 @@ jobs: uses: actions/checkout@v3 - name: Notify Discord for Push - if: startsWith(github.event_name, 'push') + if: github.event_name == 'push' env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} run: | @@ -41,13 +41,13 @@ jobs: $DISCORD_WEBHOOK - name: Notify Discord for Issues - if: startsWith(github.event_name, 'issues') + if: github.event_name == 'issues' env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} run: | ISSUE_TITLE=${{ github.event.issue.title }} ISSUE_NUMBER=${{ github.event.issue.number }} - ISSUE_BODY=${{ github.event.issue.body || "No description provided." }} + ISSUE_BODY=${{ github.event.issue.body }} ISSUE_URL=${{ github.event.issue.html_url }} REPO_NAME=${{ github.repository }} ACTOR=${{ github.actor }} @@ -69,13 +69,13 @@ jobs: $DISCORD_WEBHOOK - name: Notify Discord for Release - if: startsWith(github.event_name, 'release') + if: github.event_name == 'release' env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} run: | - RELEASE_NAME=${{ github.event.release.name || "Untitled Release" }} + RELEASE_NAME=${{ github.event.release.name }} RELEASE_TAG=${{ github.event.release.tag_name }} - RELEASE_BODY=${{ github.event.release.body || "No release notes provided." }} + RELEASE_BODY=${{ github.event.release.body }} RELEASE_URL=${{ github.event.release.html_url }} REPO_NAME=${{ github.repository }} ACTOR=${{ github.actor }} @@ -95,3 +95,4 @@ jobs: ] }" \ $DISCORD_WEBHOOK +