Skip to content

Commit 2425b4f

Browse files
agents: Update PR review range to use merge base
- Changed references from `<base_remote>/<base>..HEAD` to `<merge_base>..HEAD` across documentation, scripts, and prompts to align with Git best practices. - Updated `SKILL.md`, `review-checklist.md`, and agent configuration to reflect this change. - Revised shell scripts (`collect_pr_context.sh` and `review_range.sh`) to compute and use `merge-base` for the review range. Assisted-by: Codex
1 parent b92af05 commit 2425b4f

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

.agents/skills/pr-review-auditor/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: pr-review-auditor
3-
description: Review the currently checked-out PR by discovering its upstream base branch with GitHub CLI, diffing base..HEAD, and performing a correctness-first code review that enforces repository policy with special priority on *GUIDELINES*.md rules and then AGENTS.md. Use when asked to do a full PR review, /review-style audit, commit-range quality check, or policy-compliance review of branch changes.
3+
description: Review the currently checked-out PR by discovering its upstream base branch with GitHub CLI, diffing merge-base..HEAD, and performing a correctness-first code review that enforces repository policy with special priority on *GUIDELINES*.md rules and then AGENTS.md. Use when asked to do a full PR review, /review-style audit, commit-range quality check, or policy-compliance review of branch changes.
44
---
55

66
# PR Review Auditor
@@ -20,7 +20,7 @@ policy precedence: `*GUIDELINES*.md` before `AGENTS.md`.
2020
- checked-out branch,
2121
- PR number and base branch (via `gh pr view`),
2222
- merge-base commit,
23-
- review range (`<base_remote>/<base>..HEAD`),
23+
- review range (`<merge_base>..HEAD`),
2424
- changed files,
2525
- available policy files (`*GUIDELINES*.md`, `AGENTS.md`).
2626

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
interface:
22
display_name: "PR Review Auditor"
3-
short_description: "Review base..HEAD with GUIDELINES-first policy checks."
4-
default_prompt: "Use $pr-review-auditor to review the current PR from upstream base to HEAD with findings-first output and strict GUIDELINES/AGENTS compliance checks."
3+
short_description: "Review merge-base..HEAD with GUIDELINES-first policy checks."
4+
default_prompt: "Use $pr-review-auditor to review the current PR from merge-base to HEAD with findings-first output and strict GUIDELINES/AGENTS compliance checks."

.agents/skills/pr-review-auditor/references/review-checklist.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
## Review Scope
1010

11-
- Determine PR base branch and audit `<base_remote>/<base>..HEAD`.
11+
- Determine PR base branch, compute merge-base, and audit `<merge_base>..HEAD`.
1212
- Review full commit messages, changed files, and relevant patches.
1313
- Focus on behavior, CI impact, tests, then style.
1414

.agents/skills/pr-review-auditor/scripts/collect_pr_context.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ fi
6262
rm -f "${fetch_error_file}"
6363

6464
merge_base="$(git merge-base "${base_remote}/${base_ref}" HEAD)"
65-
review_range="${base_remote}/${base_ref}..HEAD"
65+
review_range="${merge_base}..HEAD"
6666

6767
echo "CONTEXT_SOURCE=${context_source}"
6868
echo "PR_NUMBER=${pr_number}"

.agents/skills/pr-review-auditor/scripts/review_range.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -euo pipefail
44
range="${1:-}"
55
if [[ -z "${range}" ]]; then
66
echo "usage: $(basename "$0") <git-range>" >&2
7-
echo "example: $(basename "$0") upstream/main..HEAD" >&2
7+
echo "example: $(basename "$0") <merge-base-sha>..HEAD" >&2
88
exit 1
99
fi
1010

0 commit comments

Comments
 (0)