@kody-ade/kody-engine-lite 0.1.93 → 0.1.95
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.
- package/dist/bin/cli.js +11 -3
- package/package.json +1 -1
package/dist/bin/cli.js
CHANGED
|
@@ -444,8 +444,8 @@ function ensureFeatureBranch(issueNumber, title, cwd) {
|
|
|
444
444
|
logger.info(` Created new branch: ${branchName}`);
|
|
445
445
|
return branchName;
|
|
446
446
|
}
|
|
447
|
-
function syncWithDefault(cwd) {
|
|
448
|
-
const defaultBranch = getDefaultBranch(cwd);
|
|
447
|
+
function syncWithDefault(cwd, branch) {
|
|
448
|
+
const defaultBranch = branch ?? getDefaultBranch(cwd);
|
|
449
449
|
const current = getCurrentBranch(cwd);
|
|
450
450
|
if (current === defaultBranch) return;
|
|
451
451
|
try {
|
|
@@ -3172,7 +3172,7 @@ function ensureFeatureBranchIfNeeded(ctx) {
|
|
|
3172
3172
|
if (ctx.input.dryRun) return;
|
|
3173
3173
|
if (ctx.input.prNumber) {
|
|
3174
3174
|
try {
|
|
3175
|
-
syncWithDefault(ctx.projectDir);
|
|
3175
|
+
syncWithDefault(ctx.projectDir, ctx.input.prBaseBranch);
|
|
3176
3176
|
} catch (err) {
|
|
3177
3177
|
logger.warn(` Failed to sync with default branch: ${err}`);
|
|
3178
3178
|
}
|
|
@@ -4206,6 +4206,13 @@ ${input.feedback}`);
|
|
|
4206
4206
|
console.error(`Runner "${defaultRunnerName}" health check failed`);
|
|
4207
4207
|
process.exit(1);
|
|
4208
4208
|
}
|
|
4209
|
+
let prBaseBranch;
|
|
4210
|
+
if (input.prNumber) {
|
|
4211
|
+
const prDetails = getPRDetails(input.prNumber);
|
|
4212
|
+
if (prDetails) {
|
|
4213
|
+
prBaseBranch = prDetails.baseBranch;
|
|
4214
|
+
}
|
|
4215
|
+
}
|
|
4209
4216
|
const ctx = {
|
|
4210
4217
|
taskId,
|
|
4211
4218
|
taskDir,
|
|
@@ -4217,6 +4224,7 @@ ${input.feedback}`);
|
|
|
4217
4224
|
dryRun: input.dryRun,
|
|
4218
4225
|
issueNumber: input.issueNumber,
|
|
4219
4226
|
prNumber: input.prNumber,
|
|
4227
|
+
prBaseBranch,
|
|
4220
4228
|
feedback: input.feedback,
|
|
4221
4229
|
local: input.local,
|
|
4222
4230
|
complexity: input.complexity
|