From 582aa6ca1e8cdf489f63741ab00f71e54f21e0a8 Mon Sep 17 00:00:00 2001 From: Pranshul Date: Thu, 21 Nov 2024 19:20:44 +0530 Subject: [PATCH] Update discord.yml Signed-off-by: Pranshul --- .github/workflows/discord.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/discord.yml b/.github/workflows/discord.yml index 99f6ad4d..657751a9 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: github.event_name == 'push' + if: startsWith(github.event_name, 'push') env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} run: | @@ -41,13 +41,13 @@ jobs: $DISCORD_WEBHOOK - name: Notify Discord for Issues - if: github.event_name == 'issues' + if: startsWith(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 }} + ISSUE_BODY=${{ github.event.issue.body || "No description provided." }} 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: github.event_name == 'release' + if: startsWith(github.event_name, 'release') env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} run: | - RELEASE_NAME=${{ github.event.release.name }} + RELEASE_NAME=${{ github.event.release.name || "Untitled Release" }} RELEASE_TAG=${{ github.event.release.tag_name }} - RELEASE_BODY=${{ github.event.release.body }} + RELEASE_BODY=${{ github.event.release.body || "No release notes provided." }} RELEASE_URL=${{ github.event.release.html_url }} REPO_NAME=${{ github.repository }} ACTOR=${{ github.actor }}