pr-review-html
PR Review HTML
Build an HTML page that presents a PR diff reorganized for reviewer comprehension — not in file-tree order.
Prerequisites
Write one HTML file to the system temp directory. Decide its structure from the diff in front of you rather than guessing.
Gather the diff
Expect a GitHub PR link (a full URL like https://github.com/<owner>/<repo>/pull/<n>, or an equivalent gh-resolvable reference). Use gh pr diff <pr> to collect every file's path, additions, deletions, and hunks.
If the user didn't provide a PR link, stop and ask. Do not guess at the current branch, infer from recent history, or fall back to a local git diff. Ask the user which diff they want to review — a specific PR URL or number — and wait for their reply before continuing.
Group changes for comprehension
Do not present files in alphabetical or tree order. Reorganize into sections ordered by reviewer value: