Skip to content

fix(GitHub): change webhook request body field from message to text #3

fix(GitHub): change webhook request body field from message to text

fix(GitHub): change webhook request body field from message to text #3

name: Notify Reviewers
on:
pull_request:
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 "{\"text\": \"$MESSAGE\"}" $INTERNAL_NOTIFICATION_CHANNEL_API_ENDPOINT