-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2049 from HHS/kw-github-slack
[TTAHUB-2749] Add github-slack workflow for production PR notifications
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Pull Request Notifications | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- production | ||
types: [ready_for_review] | ||
|
||
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: | | ||
curl -X POST -H 'Content-type: application/json' --data "{\"text\": \":rocket: A pull request (#${{ github.event.pull_request.number }}) to *production* is now open! ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/pull/${{ github.event.pull_request.number }}\"}" $SLACK_WEBHOOK_URL |