Skip to content

Commit

Permalink
adding slack alerting for issues that are created in the repo
Browse files Browse the repository at this point in the history
  • Loading branch information
estohlmann committed Oct 9, 2024
1 parent 96a6b08 commit 2addf1e
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/issues.alert.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Alert on Issue Creation
on:
issues:
types: [opened, reopened]

jobs:
SendAlert:
runs-on: ubuntu-latest
steps:
send_final_slack_notification:
name: Send Slack Notification
needs: [ cdk-build, pre-commit ]
runs-on: ubuntu-latest
if: always()
steps:
- name: Send slack notification for issue created
uses: rtCamp/action-slack-notify@v2
if: github.event.action == 'opened'
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_COLOR: 'success'
SLACK_TITLE: 'Issue Created'
SLACK_FOOTER: ''
MSG_MINIMAL: 'actions url'
SLACK_MESSAGE: '<!here> Issue ${{ github.event.issue.title }} created by ${{ github.event.sender.login }}'
- name: Send slack notification for issue reopened
uses: rtCamp/action-slack-notify@v2
if: github.event.action == 'reopened'
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_COLOR: 'success'
SLACK_TITLE: 'Issue Reopened'
SLACK_FOOTER: ''
MSG_MINIMAL: 'actions url'
SLACK_MESSAGE: '<!here> Issue ${{ github.event.issue.title }} reopened by ${{ github.event.sender.login }}'

0 comments on commit 2addf1e

Please sign in to comment.