claudetool/codereview: new package extracted from claudetool
Co-Authored-By: sketch <hello@sketch.dev>
diff --git a/claudetool/keyword.go b/claudetool/keyword.go
index 8c693be..5d9f155 100644
--- a/claudetool/keyword.go
+++ b/claudetool/keyword.go
@@ -71,8 +71,8 @@
//go:embed keyword_system_prompt.txt
var keywordSystemPrompt string
-// findRepoRoot attempts to find the git repository root from the current directory
-func findRepoRoot(wd string) (string, error) {
+// FindRepoRoot attempts to find the git repository root from the current directory
+func FindRepoRoot(wd string) (string, error) {
cmd := exec.Command("git", "rev-parse", "--show-toplevel")
cmd.Dir = wd
out, err := cmd.Output()
@@ -89,7 +89,7 @@
return "", err
}
wd := WorkingDir(ctx)
- root, err := findRepoRoot(wd)
+ root, err := FindRepoRoot(wd)
if err == nil {
wd = root
}