-
Notifications
You must be signed in to change notification settings - Fork 7
39 lines (36 loc) · 1.35 KB
/
pr-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
33
34
35
36
37
38
39
name: Pull Request Notifications
on:
pull_request:
# branches:
# - production
types: [opened, ready_for_review, closed, reopened]
jobs:
# notify_slack:
# runs-on: ubuntu-latest
# steps:
# - name: Notify slack when a PR to production is opened
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
# run: |
# PR_LINK="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/pull/${{ github.event.pull_request.number }}"
# curl -X POST -H 'Content-type: application/json' --data "{\"text\": \":rocket: A pull request (#${{ github.event.pull_request.number }}) to *production* is now open! <${PR_LINK}|Click here to view the PR>\"}" $SLACK_WEBHOOK_URL
notify_slack_any_pr:
runs-on: ubuntu-latest
# if: github.event.action == 'opened'
steps:
- name: Notify second Slack channel for any PR opened
env:
SLACK_WEBHOOK_URL_TEST: ${{ secrets.SLACK_WEBHOOK_URL_TEST }}
run: |
curl -X POST -H 'Content-type: application/json' \
--data '{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "<https://github.com/HHS/Head-Start-TTADP/pull/2068|PR #2068: New feature>"
}
}
]
}' $SLACK_WEBHOOK_URL_TEST