add a workflow that notifies slack on a PR review request

This commit is contained in:
charbelrami 2023-09-14 12:09:11 -03:00
parent 0aab064112
commit 42fad94d8f

20
.github/workflows/notify-slack.yml vendored Normal file
View File

@ -0,0 +1,20 @@
name: Notify Slack on PR Review Request
on:
pull_request_target:
types: [review_requested]
jobs:
notify_slack:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.requested_teams.*.slug, 'volunteer-a11y-reviewers')
steps:
- name: Notify Slack
uses: slackapi/slack-github-action@v1.24.0
with:
payload: |
{ "pr_url": "${{ github.event.pull_request.html_url }}",
"pr_title": "${{ github.event.pull_request.title }}",
"pr_author": "${{ github.event.pull_request.user.name }}"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}