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). |
||
|---|---|---|
| .. | ||
| code_comment.go | ||
| code_comment_test.go | ||
| code_search.go | ||
| code_search_test.go | ||
| comment_collector.go | ||
| comment_collector_test.go | ||
| definitions.go | ||
| definitions_test.go | ||
| file_find.go | ||
| file_find_test.go | ||
| file_read.go | ||
| file_read_diff.go | ||
| file_read_diff_test.go | ||
| file_read_test.go | ||
| filereader.go | ||
| filereader_read_test.go | ||
| filereader_test.go | ||
| response_message.go | ||
| response_message_test.go | ||
| stub.go | ||
| stub_test.go | ||