@tarcisiopgs/lisa 1.38.4 → 1.38.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1188,6 +1188,27 @@ function emptyCommitFailure(result) {
|
|
|
1188
1188
|
]
|
|
1189
1189
|
});
|
|
1190
1190
|
}
|
|
1191
|
+
async function pullBaseBranch(config) {
|
|
1192
|
+
const workspace = resolve3(config.workspace);
|
|
1193
|
+
const baseBranch = config.base_branch;
|
|
1194
|
+
const repoPaths = [workspace];
|
|
1195
|
+
if (config.repos.length > 0) {
|
|
1196
|
+
for (const repo of config.repos) {
|
|
1197
|
+
repoPaths.push(resolve3(workspace, repo.path));
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
for (const repoPath of repoPaths) {
|
|
1201
|
+
try {
|
|
1202
|
+
await execa("git", ["pull", "--ff-only", "origin", baseBranch], {
|
|
1203
|
+
cwd: repoPath,
|
|
1204
|
+
reject: true,
|
|
1205
|
+
timeout: 3e4
|
|
1206
|
+
});
|
|
1207
|
+
} catch (err) {
|
|
1208
|
+
warn(`Failed to pull ${baseBranch} in ${repoPath}: ${formatError(err)}`);
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1191
1212
|
function appendSessionLog(logFile, result) {
|
|
1192
1213
|
try {
|
|
1193
1214
|
appendFileSync(
|
|
@@ -2656,7 +2677,11 @@ function cleanupManifest(cwd, issueId) {
|
|
|
2656
2677
|
function readManifestFile(filePath) {
|
|
2657
2678
|
if (!existsSync6(filePath)) return null;
|
|
2658
2679
|
try {
|
|
2659
|
-
|
|
2680
|
+
const parsed = JSON.parse(readFileSync6(filePath, "utf-8").trim());
|
|
2681
|
+
if (Array.isArray(parsed)) {
|
|
2682
|
+
return parsed.find((m) => m.prUrl) ?? null;
|
|
2683
|
+
}
|
|
2684
|
+
return parsed;
|
|
2660
2685
|
} catch {
|
|
2661
2686
|
return null;
|
|
2662
2687
|
}
|
|
@@ -3505,6 +3530,7 @@ async function runConcurrentLoop(config, source, models, workspace, opts) {
|
|
|
3505
3530
|
kanbanEmitter.emit("issue:started", issue.id);
|
|
3506
3531
|
await moveToInProgress(issue, source, config);
|
|
3507
3532
|
activeCleanups.set(issue.id, { previousStatus, source, sourceConfig: config.source_config });
|
|
3533
|
+
await pullBaseBranch(config);
|
|
3508
3534
|
let sessionResult;
|
|
3509
3535
|
try {
|
|
3510
3536
|
sessionResult = await runWorktreeSession(
|
|
@@ -4145,6 +4171,7 @@ async function runSequentialLoop(config, source, models, workspace, opts) {
|
|
|
4145
4171
|
kanbanEmitter.emit("issue:started", issue.id);
|
|
4146
4172
|
await moveToInProgress(issue, source, config);
|
|
4147
4173
|
activeCleanups.set(issue.id, { previousStatus, source, sourceConfig: config.source_config });
|
|
4174
|
+
await pullBaseBranch(config);
|
|
4148
4175
|
let sessionResult;
|
|
4149
4176
|
try {
|
|
4150
4177
|
sessionResult = config.workflow === "worktree" ? await runWorktreeSession(config, issue, logFile, session, models, source) : await runBranchSession(config, issue, logFile, session, models, source);
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
runLoop,
|
|
15
15
|
saveConfig,
|
|
16
16
|
validateConfig
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-CR3KNSTM.js";
|
|
18
18
|
import {
|
|
19
19
|
CliError,
|
|
20
20
|
buildExecutionWaves,
|
|
@@ -1850,7 +1850,7 @@ async function reviewAndCreate(plan2, planPath, opts) {
|
|
|
1850
1850
|
log("Run `lisa run` when ready.");
|
|
1851
1851
|
return;
|
|
1852
1852
|
}
|
|
1853
|
-
const { runLoop: runLoop2 } = await import("./loop-
|
|
1853
|
+
const { runLoop: runLoop2 } = await import("./loop-ZPBH3SLB.js");
|
|
1854
1854
|
const waves = buildExecutionWaves(plan2.issues);
|
|
1855
1855
|
const maxWaveSize = Math.max(...waves.map((w) => w.length));
|
|
1856
1856
|
await runLoop2(config2, {
|