diff --git a/.github/workflows/cli-pr-review.yml b/.github/workflows/cli-pr-review.yml index f9cb613c01a..6ea33f9778a 100644 --- a/.github/workflows/cli-pr-review.yml +++ b/.github/workflows/cli-pr-review.yml @@ -83,6 +83,7 @@ jobs: env: GH_TOKEN: ${{ steps.token.outputs.token }} PR_NUMBER: ${{ needs.validate.outputs.pr_number }} + COMMENT_ID: ${{ github.event_name == 'issue_comment' && github.event.comment.id || '' }} run: |- set -euo pipefail # This API version returns the exact run, even when other PRs trigger reviews. @@ -90,7 +91,8 @@ jobs: gh api --method POST \ repos/databricks-eng/eng-dev-ecosystem/actions/workflows/cli-pr-review.yml/dispatches \ -H 'X-GitHub-Api-Version: 2026-03-10' \ - -f ref=main -f "inputs[pull_request_number]=$PR_NUMBER" > "$RUNNER_TEMP/review-run.json" + -f ref=main -f "inputs[pull_request_number]=$PR_NUMBER" \ + -f "inputs[comment_id]=$COMMENT_ID" > "$RUNNER_TEMP/review-run.json" run_id=$(jq -er '.workflow_run_id | select(type == "number")' "$RUNNER_TEMP/review-run.json") echo "[Review run](https://github.com/databricks-eng/eng-dev-ecosystem/actions/runs/$run_id)" >> "$GITHUB_STEP_SUMMARY" echo 'To request another review, comment `/review` on the PR.' >> "$GITHUB_STEP_SUMMARY"