Skip to content

Trigger message from label event #5

Trigger message from label event

Trigger message from label event #5

Workflow file for this run

name: Slack PR Notification
on:
pull_request_target:
types: [labeled]
jobs:
rfc-notify:
name: RFC Notification
runs-on: ubuntu-latest
steps:
- name: Check PR label
id: check
run: |
if echo "${{ github.event.pull_request.labels.*.name }}" | grep -q "RFC"; then
echo "NOTIFY_SLACK=true" >> $GITHUB_ENV
fi
- name: Notify Slack
if: env.NOTIFY_SLACK == 'true'
uses: slackapi/[email protected]
with:
channel-id: "rc-test"
slack-message: "${{ github.actor }} labeled a PR with RFC: ${{ github.event.pull_request.title }}. URL: ${{ github.event.pull_request.html_url }}"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}