Repository navigation
fix(adversarial-review): say to pass --repo when --repo-dir is not a checkout - #2120
Merged
Merged
Conversation
…checkout Generated-by: Claude Opus 5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
run --target pr:<N>without--repoletsghinfer the repository from the git remotes of--repo-dir. With an exported PR head (the--repo-dirthat docs(pr-management): export the PR head for adversarial reviewers #1986 and fix(adversarial-review): review a PR's head, and close two gaps from #1997 #2004 now recommend) there are none, and the run dies with a baregh pr diff failed: failed to run git: fatal: not a git repository, which points at the export rather than at the missing flag.--repois absent andgh pr difffails, the error now says to pass--repo OWNER/NAME. The hint is not tied to git's or gh's wording, so a localized git or a checkout with no GitHub remote gets it too. Runs with--repoare unchanged.--repohelp text and the tool README say when--repois required.Type of change
tools/*/withpyproject.toml)docs/,README.md,CONTRIBUTING.md)Test plan
uv run pytestpasses (249 passed) fortools/adversarial-review; ruff and mypy pass through the hooks.test_pr_input_without_repo_outside_a_checkout_names_the_fixfails onmainand passes with the change; it also checks that runs with--repoget no hint.prek run --fileson the four changed files passes, withlycheeskipped: it needs a Rust toolchain the sandbox could not download. The change adds no links.prek run --all-fileswas not run.--repo-dirset to agit archiveexport.RFC-AI-0004 compliance
Linked issues
Refs #1986, #2004
Notes for reviewers (optional)
An adversarial review (codex, antigravity, copilot) of the first version flagged that matching on
not a git repositorymissed other no-remote failures; the hint is now added for everygh pr difffailure without--repo, worded conditionally so it stays accurate when the cause is something else (auth, network).🤖 Generated with Claude Code