feat: build 阶段根据 tracked 分支处理
This commit is contained in:
@@ -4,7 +4,7 @@ import { join } from "node:path";
|
||||
import type { RuneConfig } from "../types.ts";
|
||||
import { CommandError } from "../cli/errors.ts";
|
||||
import { getChangeDir } from "./config.ts";
|
||||
import { parseTasks } from "./task-parser.ts";
|
||||
import { parseTasks, validateTaskFormat } from "./task-parser.ts";
|
||||
import { applyCommandPrefix, getPmPrefix } from "./pm.ts";
|
||||
|
||||
export function assembleDiscussPrompt(config: RuneConfig): string {
|
||||
@@ -85,6 +85,10 @@ export async function assembleBuildPrompt(
|
||||
});
|
||||
}
|
||||
|
||||
if (!config.metadata?.tracked) {
|
||||
return applyCommandPrefix(build.prompt, config);
|
||||
}
|
||||
|
||||
const changeDir = getChangeDir(projectRoot, changeName);
|
||||
const taskPath = join(changeDir, "task.md");
|
||||
|
||||
@@ -98,6 +102,8 @@ export async function assembleBuildPrompt(
|
||||
});
|
||||
}
|
||||
|
||||
validateTaskFormat(taskContent);
|
||||
|
||||
const tasks = parseTasks(taskContent);
|
||||
const pendingTasks = tasks.filter((t) => !t.checked);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user