Skip to content

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

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

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

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: |

Check failure on line 12 in .github/workflows/notify-reviewers.yml

View workflow run for this annotation

GitHub Actions / Notify Reviewers

Invalid workflow file

The workflow is not valid. .github/workflows/notify-reviewers.yml (Line: 12, Col: 20): Unrecognized named-value: 'jq'. Located at position 1 within expression: jq -r github.event.pull_request.requested_reviewers.*.login
PR_ID=${{ github.event.pull_request.number }}
PR_URL=${{ github.event.pull_request.html_url }}
PR_AUTHOR=${{ github.event.pull_request.user.login }}
REVIEWERS=${{ jq -r github.event.pull_request.requested_reviewers.*.login }}
MESSAGE="@channel\nNew Pull Request: [#$PR_ID]($PR_URL) by @$PR_AUTHOR\nRequested Reviewers: $REVIEWERS"
curl -X POST -H "Content-Type: application/json" -d "{\"text\": \"$MESSAGE\"}" $INTERNAL_NOTIFICATION_CHANNEL_API_ENDPOINT