diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2021-04-20 12:42:43 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-20 12:02:13 +0200 |
commit | df84cd77b87268a8ef9c46b1b4e821ebb5a3b49b (patch) | |
tree | 773eea744b6b123daf46ca3bfccee4e4dcb186db /.github/workflows/discord.yml | |
parent | a8915ecd610a4e51cdac207a3a4a4d264de9b9ef (diff) | |
download | serenity-df84cd77b87268a8ef9c46b1b4e821ebb5a3b49b.zip |
Meta: Actually check for draft PRs before sending discord notifications
Diffstat (limited to '.github/workflows/discord.yml')
-rw-r--r-- | .github/workflows/discord.yml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/.github/workflows/discord.yml b/.github/workflows/discord.yml index 194b236182..0e2d29a342 100644 --- a/.github/workflows/discord.yml +++ b/.github/workflows/discord.yml @@ -11,7 +11,7 @@ jobs: - name: Wait for tests to finish uses: IdanHo/action-wait-for-check@7b2192dd83108237d2f2e6518f6351be333a955c id: wait-for-tests - if: ${{ (github.event['pull_request'] && github.event['action'] == 'opened' && !(github.event['pull_request'] == 'draft')) || github.event['commits'] }} + if: ${{ (github.event['pull_request'] && github.event['action'] == 'opened' && !github.event.pull_request.draft) || github.event['commits'] }} with: token: ${{ secrets.GITHUB_TOKEN }} excludedCheckName: "notify_discord" @@ -24,7 +24,7 @@ jobs: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} CUSTOM_GITHUB_EVENT_NAME: ${{ github.event_name == 'pull_request_target' && 'pull_request' || github.event_name }} # fake the event type as discord doesn't know how to parse the special pull_request_target context uses: IdanHo/action-discord@754598254f288e6d8e9fca637832e3c163515ba8 - if: ${{ (github.event['pull_request'] && github.event['action'] == 'opened' && !(github.event['pull_request'] == 'draft')) || github.event['commits'] }} + if: ${{ (github.event['pull_request'] && github.event['action'] == 'opened' && !github.event.pull_request.draft) || github.event['commits'] }} - name: Discord build status env: @@ -32,6 +32,6 @@ jobs: DISCORD_USERNAME: GitHub # we have to set these manually for non-default messages DISCORD_AVATAR: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png uses: IdanHo/action-discord@754598254f288e6d8e9fca637832e3c163515ba8 - if: ${{ (github.event['pull_request'] && github.event['action'] == 'opened' && !(github.event['pull_request'] == 'draft')) || github.event['commits'] }} + if: ${{ (github.event['pull_request'] && github.event['action'] == 'opened' && !github.event.pull_request.draft) || github.event['commits'] }} with: args: "The build ${{ steps.wait-for-tests.outputs.conclusion == 'success' && 'passed :white_check_mark:' || 'failed :x:' }}" |