diff --git a/.github/actions/pr-review/prompts/base-pr-review.md b/.github/actions/pr-review/prompts/base-pr-review.md index 70edde7..56a4024 100644 --- a/.github/actions/pr-review/prompts/base-pr-review.md +++ b/.github/actions/pr-review/prompts/base-pr-review.md @@ -11,6 +11,7 @@ Read `.github/pr-context.json` — it contains pre-fetched PR data with these fi - `current_sha`: the HEAD SHA (use this as `CURRENT_SHA`) - `current_base_sha`: the PR base SHA (use this as `CURRENT_BASE_SHA`) - `workflow_ref`: the workflow ref that owns this review state (use this as `CURRENT_WORKFLOW_REF`) +- `review_run_url`: link to this review workflow run - `summary_heading`: the exact markdown heading for the summary comment - `review_mode`: `"incremental"` or `"full"` - `last_reviewed_sha`: the SHA from the previous review, used only for deduplication @@ -89,11 +90,26 @@ Do not delete existing summary comments before the new review has been posted. Use this template for the summary body. The heading must be exactly the `summary_heading` value from `.github/pr-context.json`. +Always include the review run link and a short review summary before the issue sections. +Use 1-3 sentences for the review summary. +For incremental reviews, explicitly say what the new commits changed. If prior bot +feedback appears addressed, say that in the review summary. Use `existing_findings`, +`comments`, and `.github/resolved-threads.json` as context, but verify against the +current diff before claiming something was fixed. If there were no prior findings and +no new findings, say what changed and that no new issues were found. Do not leave the +summary as only counts plus "None found" sections. + ``` **Blocking Issues: N** | **Suggestions: M** | **Threads Resolved: R** _Review mode: incremental since ``_ (or _Review mode: full_) +[View review run]() + +### Review Summary +<1-3 sentences describing what was reviewed. In incremental mode, include addressed +prior feedback when applicable, for example "The previous pagination suggestion is now +addressed by passing the page token through the client call. No new issues found."> ### Security Issues @@ -107,8 +123,9 @@ _Review mode: incremental since ``_ (or _Review mode: f ``` -Replace `CURRENT_SHA`, `CURRENT_BASE_SHA`, and `CURRENT_WORKFLOW_REF` with the values -from `.github/pr-context.json`. +Replace `CURRENT_SHA`, `CURRENT_BASE_SHA`, `CURRENT_WORKFLOW_REF`, and +`` with the values from `.github/pr-context.json`. If `review_run_url` +is empty, omit the review run link line. After the summary table, include a collapsible section with a single fenced code block that lists every finding as a concise, actionable description a developer can follow diff --git a/.github/actions/pr-review/scripts/fetch-pr-context.py b/.github/actions/pr-review/scripts/fetch-pr-context.py index bd5cb7b..78a3aa3 100644 --- a/.github/actions/pr-review/scripts/fetch-pr-context.py +++ b/.github/actions/pr-review/scripts/fetch-pr-context.py @@ -118,6 +118,9 @@ def main(): repo = os.environ.get("GITHUB_REPOSITORY", "") pr_number = os.environ.get("PR_NUMBER", "") workflow_ref = os.environ.get("GITHUB_WORKFLOW_REF", "") + run_id = os.environ.get("GITHUB_RUN_ID", "") + server_url = os.environ.get("GITHUB_SERVER_URL", "https://github.com").rstrip("/") + review_run_url = f"{server_url}/{repo}/actions/runs/{run_id}" if repo and run_id else None summary_heading = os.environ.get( "REVIEW_SUMMARY_HEADING", DEFAULT_REVIEW_SUMMARY_HEADING, @@ -236,6 +239,7 @@ def main(): "current_sha": current_sha, "current_base_sha": current_base_sha, "workflow_ref": workflow_ref, + "review_run_url": review_run_url, "summary_heading": summary_heading, "review_mode": review_mode, "last_reviewed_sha": last_reviewed_sha, diff --git a/.github/workflows/general-pr-review.yaml b/.github/workflows/general-pr-review.yaml index 257d1be..3f7ba0e 100644 --- a/.github/workflows/general-pr-review.yaml +++ b/.github/workflows/general-pr-review.yaml @@ -26,4 +26,4 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} pr_number: ${{ github.event.pull_request.number }} review_prompt: general - timeout-minutes: 10 + timeout-minutes: 15 diff --git a/.github/workflows/pr-review.yaml b/.github/workflows/pr-review.yaml index d732d24..f292971 100644 --- a/.github/workflows/pr-review.yaml +++ b/.github/workflows/pr-review.yaml @@ -32,4 +32,4 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} pr_number: ${{ github.event.pull_request.number }} review_prompt: ${{ inputs.review_prompt || 'connector' }} - timeout-minutes: 10 + timeout-minutes: 15