docs(cli): link base branch order

This commit is contained in:
Alex Alecu
2026-05-22 13:50:43 +03:00
parent 0d12909a9e
commit c6f3b9cba8
3 changed files with 4 additions and 0 deletions
@@ -30,6 +30,8 @@ If user-provided instructions exist, they may refine review focus, but they MUST
When no base is specified, choose a base by trying the following refs in order and using the first one that exists:
This priority list must match `Review.getBaseBranch()` in `packages/opencode/src/kilocode/review/review.ts`, which is used by the HTTP review endpoints.
1. `origin/main`
2. `origin/master`
3. `origin/dev`
@@ -9,6 +9,7 @@ export namespace Review {
* Detect base branch (main, master, dev, or develop)
* Priority: main > master > dev > develop
* Falls back to 'main' if none found
* Keep this in sync with the default base list in local-review.txt.
*/
export async function getBaseBranch(): Promise<string> {
const candidates = ["main", "master", "dev", "develop"]
@@ -37,6 +37,7 @@ describe("local-review command", () => {
expect(text).toContain("local `dev`")
expect(text).toContain("local `develop`")
expect(text).toContain("fall back to `main`")
expect(text).toContain("Review.getBaseBranch()")
})
test("template instructs the model to validate the base before reviewing", () => {