summarize-review
This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.
Context
Repository: !gh repo view --json nameWithOwner -q .nameWithOwner 2>/dev/null || echo "unknown"
Default branch: !git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@refs/remotes/origin/@@' || echo main
Current branch: !git branch --show-current 2>/dev/null
Instructions
Output the body for the user to confirm; do not post unless explicitly asked.
Process
-
Establish baseline and head (
$ARGUMENTSis a PR number, a full PR URL, or empty; if empty, infer the PR from the current branch viagh pr view --json number,title,headRefName):- Baseline
<first-sha>(last commit in the PR author's leading run):gh api repos/<o>/<r>/pulls/<n>/commits --paginate --jq '(.[0].author.login // .[0].commit.author.name) as $a | reduce .[] as $c ({run: true, sha: null}; if .run and (($c.author.login // $c.commit.author.name) == $a) then {run: true, sha: $c.sha} else {run: false, sha: .sha} end) | .sha'..author.loginis null for unlinked-email commits, so fall back to.commit.author.namewhen reducing. - Latest head SHA:
gh api repos/<o>/<r>/pulls/<n> --jq .head.sha - First commit's author is the review's audience:
gh api repos/<o>/<r>/pulls/<n>/commits --paginate --jq '.[0].author.login'
- Baseline
-
Read the original author's code at the first PR commit:
git show <first-sha>:<path>for each changed file.