stop trying futily to send Mattermost alerts in zrok forks and suppress alerts for Vercel "building" comments on PRs

This commit is contained in:
Kenneth Bingham 2023-01-31 10:47:35 -05:00
parent 98a4f9384a
commit 7801baeafa
No known key found for this signature in database
GPG Key ID: 31709281860130B6

View File

@ -22,8 +22,18 @@ jobs:
steps:
- uses: openziti/ziti-mattermost-action-py@main
if: |
(github.event_name != 'pull_request_review')
|| (github.event_name == 'pull_request_review' && github.event.review.state == 'approved')
env.ZHOOK_URL != null
&& !(
github.event_name == 'issue_comment'
&& github.event.sender.login == 'vercel[bot]'
&& contains(github.event.comment.body, 'Building')
)
&& (
github.event_name != 'pull_request_review'
|| (github.event_name == 'pull_request_review' && github.event.review.state == 'approved')
)
env:
ZHOOK_URL: ${{ secrets.ZHOOK_URL }}
with:
zitiId: ${{ secrets.ZITI_MATTERMOST_IDENTITY }}
webhookUrl: ${{ secrets.ZHOOK_URL }}