-
Notifications
You must be signed in to change notification settings - Fork 1.2k
32 lines (30 loc) · 1.18 KB
/
notify-slack.yml
File metadata and controls
32 lines (30 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Slack Notifications
on:
pull_request:
types: [labeled]
issues:
types: [opened]
jobs:
notify-slack:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Send External PR Notification
if: github.event_name == 'pull_request' && github.event.label.name == 'pr/external'
uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_TITLE: 'PR Created: ${{ github.event.pull_request.title }} by ${{ github.event.pull_request.user.login }}'
SLACK_FOOTER: ''
MSG_MINIMAL: true
SLACK_MESSAGE: '${{ github.event.pull_request.html_url }}'
- name: Send New Issue Notification
if: github.event_name == 'issue'
uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_TITLE: 'Issue Created: ${{ github.event.issue.title }} by ${{ github.event.issue.user.login }}'
SLACK_FOOTER: ''
MSG_MINIMAL: true
SLACK_MESSAGE: '${{ github.event.issue.html_url }}'