Repository navigation
fix(review): resolve quick PR targets safely - #1478
Conversation
|
The latest CI run on @will-lamerton, could you click "Re-run failed jobs" on the PR checks and changeset check runs when you get a chance? I don't have permission to re-run them myself. |
|
/re-review |
nc-review: comments — 2 important, 3 nits@puri-adityakumar — a few things worth a look, none blocking. Fixes 🟠 important · The truncation test asserts the user-prompt wording ( 🟠 important ·
⚪ nit · The new ⚪ nit ·
⚪ nit · The new 🔴 blocking · 🟠 a reviewer would ask for a change · ⚪ optional Automated code review — correctness, security, design, tests, plus duplicates and scope. A human still decides; this is not a substitute for review and is not exhaustive. The required status checks separately cover lint, formatting, types, unused dependencies, the test suite and the build. This bot never merges. Maintainers can rerun with |
|
Thanks for the review. I went through each point against the code, and I don't think any of them needs a change:
I also ran my own review of the diff and found no issues. The review and app-util specs pass (112 tests), and CI is green on all checks. I updated the changeset so the release note also covers the rendering fix and the upstream base for branch reviews. From my side, this is ready to merge. @akramcodez @will-lamerton, could you take a look when you get a chance? |
|
Thanks for the PR @puri-adityakumar |
Overview
/review quickis the fast review: one model call with the diff in the prompt, no tools, no agents. When I tested it from my fork, it couldn't find upstream PRs, printed the review as raw Markdown, and diffed against a stale localmain. This PR fixes those problems and keeps quick review one-shot.PR lookup works from a fork. My
originis my fork, so/review quick 1478couldn't find the upstream PR, and PR URLs weren't accepted. It now checks each configured remote and its fork parent, and takes a full PR URL as given. If a number exists in more than one repo, it asks for the URL instead of guessing. A remote with a repo's old name (likeMote-Software/nanocoder) counts as the same repo, and a stale remote that returns 404 is skipped.Clear scope and strict arguments. The output should say what was reviewed, and a typo shouldn't cost a model call. The reply now starts with the review scope and says how much of a long diff was left out. Extra arguments give a usage error without calling the model, and the slash command is echoed in the chat.
The review renders like a chat reply. It used to print as plain green text with raw
##and**marks. It now uses the normal assistant message: model name, parsed Markdown, collapsed reasoning, and the usage footer.Branch reviews use the right base. With no target, the diff was taken against local
main. My localmainwas 315 commits behind upstream, so the review got 38,274 diff lines instead of this PR's 9 files. The base is now the branch's open PR base, then a remote pointing at the fork's parent, thenupstream, thenorigin, and only then localmain(with a warning). The scope line names the base and its commit.Lookups always go to github.com. If
GH_HOSTpoints at GitHub Enterprise,ghsent the PR lookups there. The calls are now pinned to github.com.Try it
Testing
review.spec.tsx,app-util.spec.ts, andlazy-registry.spec.tspass (112 tests)main.6b777bb1) passedFindings
origin, the diff is only as fresh as the fork'smain. The command warns and prints the command to add the parent repo. It never fetches on its own.