-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (29 loc) · 1.16 KB
/
slack_notifications.yml
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: [opened, synchronize, closed]
jobs:
publish-opened-event:
if: ${{ github.event.action == 'opened' }}
runs-on: ubuntu-latest
name: Slack notifications for a new PR
steps:
- name: Sends a message to Slack API
uses: archive/[email protected]
id: notify
with:
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-channel: ${{ secrets.SLACK_CHANNEL_ID }}
slack-text: ${{ github.actor }} opened a new PR i.e ${{ github.event.pull_request.head.ref }} in ${{ github.repository }}.
publish-merge-event:
if: ${{ github.event.pull_request.merged == true }}
runs-on: ubuntu-latest
name: Slack notifications for a merge
steps:
- name: Sends a message to Slack API
uses: archive/[email protected]
id: notify
with:
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-channel: ${{ secrets.SLACK_CHANNEL_ID }}
slack-text: ${{ github.actor }} merged a PR i.e ${{ github.event.pull_request.head.ref }} in ${{ github.repository }}.