Skip to content

Commit

Permalink
fix(slack notifications): correct the if-logic for skipping some noti…
Browse files Browse the repository at this point in the history
…fications (#539)
  • Loading branch information
trentm authored Jan 14, 2025
1 parent c853fe9 commit 277a724
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/slack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ jobs:
# Skip notification if:
# - dependabot or renovate PRs, too noisy
# - draft PRs
if: ${{ !(github.event.action == 'opened' && github.event.pull_request.draft) ||
github.event.pull_request.user.login != 'dependabot[bot]' ||
github.event.pull_request.user.login != 'elastic-renovate-prod[bot]' }}
if: ${{ !(
(github.event.action == 'opened' && github.event.pull_request.draft) ||
github.event.pull_request.user.login == 'dependabot[bot]' ||
github.event.pull_request.user.login == 'elastic-renovate-prod[bot]'
) }}
runs-on: ubuntu-24.04
steps:
- name: Prepare Slack message
Expand Down Expand Up @@ -117,7 +119,6 @@ jobs:
f.write("payload={}".format(json.dumps(payload)))
- name: Post Slack message
if: ${{ steps.prepare.outputs.payload }}
uses: slackapi/[email protected]
with:
method: chat.postMessage
Expand Down

0 comments on commit 277a724

Please sign in to comment.