From 92eb8a7649de3c483293ece660cf621489791ff8 Mon Sep 17 00:00:00 2001 From: Ryan Kuo Date: Mon, 1 Jun 2026 15:27:20 -0400 Subject: [PATCH] fix: use env vars and job-level if to avoid parser bug --- .github/workflows/docs-pr-review-notify.yml | 31 +++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/docs-pr-review-notify.yml diff --git a/.github/workflows/docs-pr-review-notify.yml b/.github/workflows/docs-pr-review-notify.yml new file mode 100644 index 00000000000..68cdff8c37f --- /dev/null +++ b/.github/workflows/docs-pr-review-notify.yml @@ -0,0 +1,31 @@ +name: Docs PR Review Notify + +on: + pull_request: + types: [review_requested] + +jobs: + notify: + runs-on: ubuntu-latest + if: github.event.requested_team.slug == 'docs-prs' + steps: + - name: Send Slack notification + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_DOC_REVIEW_WEBHOOK_URL }} + PR_TITLE: ${{ github.event.pull_request.title }} + PR_URL: ${{ github.event.pull_request.html_url }} + PR_AUTHOR: ${{ github.event.pull_request.user.login }} + PR_NUMBER: ${{ github.event.pull_request.number }} + PR_LINES: ${{ github.event.pull_request.additions + github.event.pull_request.deletions }} + run: | + jq -n \ + --arg title "$PR_TITLE" \ + --arg url "$PR_URL" \ + --arg author "$PR_AUTHOR" \ + --arg number "$PR_NUMBER" \ + --arg lines "$PR_LINES" \ + '{pr_title: $title, pr_url: $url, pr_author: $author, pr_number: $number, lines_changed: $lines}' \ + | curl -X POST "$SLACK_WEBHOOK" \ + -H 'Content-Type: application/json' \ + --fail-with-body \ + -d @-