-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(GitHub): add review request notification for maintainers interna…
…l channel
- Loading branch information
1 parent
7397bd9
commit d70b128
Showing
1 changed file
with
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Internal Notification Channel | ||
on: | ||
pull_request: | ||
types: [opened, edited] | ||
branches: ["release/*"] | ||
jobs: | ||
send_notification: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Send Notification | ||
env: | ||
INTERNAL_NOTIFICATION_CHANNEL_API_ENDPOINT: ${{ secrets.INTERNAL_NOTIFICATION_CHANNEL_API_ENDPOINT }} | ||
run: | | ||
PR_ID=${{ github.event.pull_request.number }} | ||
PR_URL=${{ github.event.pull_request.html_url }} | ||
PR_AUTHOR=${{ github.event.pull_request.user.login }} | ||
REVIEWERS=${{ github.event.pull_request.requested_reviewers.*.login }} | ||
MESSAGE="New Pull Request: #$PR_ID by @$PR_AUTHOR\nLink: $PR_URL\nRequested Reviewers: $REVIEWERS" | ||
curl -X POST -H "Content-Type: application/json" -d "{\"message\": \"$MESSAGE\"}" $INTERNAL_NOTIFICATION_CHANNEL_API_ENDPOINT |