mirror of
https://github.com/alibaba/open-code-review.git
synced 2026-07-09 17:28:58 +00:00
|
Some checks are pending
CI / test (push) Waiting to run
* fix(tool): resolve file_read paths against git top-level in monorepos ocr review from a monorepo subdirectory failed with "file not found" (#287): git reports diff and `git show HEAD:<path>` paths relative to the repo root, but RepoDir was scoped to the invocation subdirectory, producing a double prefix. resolveWorkingDir now anchors RepoDir at `git rev-parse --show-toplevel` on the review path (requireGit=true); scan keeps the CWD so its `git ls-files` walk stays scoped. The top-level lookup uses a stdout-only git helper so stderr notices can't pollute the path, and fails loudly if --show-toplevel errors or is empty (e.g. a bare repo) instead of silently reusing the subdirectory. Adds regression tests for the subdir hoist, the scan-path scoping, git-show resolution of root-relative paths, and the bare-repo failure. * docs(rules): document repo-root rule.json resolution in monorepos Since #287 anchored RepoDir at the git top-level, ocr review from a monorepo subdirectory loads the repo-root .opencodereview/rule.json rather than a subdir-local one. Call out this user-visible behavior at loadProjectRule so the scope change isn't a surprise (review feedback). |
||
|---|---|---|
| .. | ||
| config_cmd.go | ||
| config_cmd_test.go | ||
| config_dispatch_test.go | ||
| emit_run_result_test.go | ||
| flags.go | ||
| flags_test.go | ||
| git.go | ||
| git_test.go | ||
| llm_cmd.go | ||
| main.go | ||
| output.go | ||
| output_helpers_test.go | ||
| output_test.go | ||
| procattr_unix.go | ||
| procattr_windows.go | ||
| provider_cmd.go | ||
| provider_cmd_test.go | ||
| provider_tui.go | ||
| provider_tui_funcs_test.go | ||
| provider_tui_test.go | ||
| review_cmd.go | ||
| review_cmd_test.go | ||
| rules_cmd.go | ||
| scan_cmd.go | ||
| scan_cmd_test.go | ||
| shared.go | ||
| shared_test.go | ||
| shell_unix.go | ||
| shell_windows.go | ||
| smallfiles_test.go | ||
| version.go | ||
| viewer_cmd.go | ||