mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
docs(cli): link base branch order
This commit is contained in:
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user