ai-project-manage-cli 7.1.24 → 7.1.25
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.
|
@@ -3284,9 +3284,33 @@ async function ensureWebIdePullRequests(cfg, taskId, workdir) {
|
|
|
3284
3284
|
]
|
|
3285
3285
|
};
|
|
3286
3286
|
}
|
|
3287
|
+
let projectBaseBranch = "";
|
|
3288
|
+
try {
|
|
3289
|
+
const baseline = await api.cli.projectBaseBranch({ taskId });
|
|
3290
|
+
projectBaseBranch = baseline.baseBranch?.trim() ?? "";
|
|
3291
|
+
} catch (err) {
|
|
3292
|
+
const tip = `\u8BFB\u53D6\u9879\u76EE\u57FA\u7EBF\u5206\u652F\u5931\u8D25: ${err instanceof Error ? err.message : err}`;
|
|
3293
|
+
console.warn(`[apm] WebIDE PR\uFF1A${tip}`);
|
|
3294
|
+
return {
|
|
3295
|
+
...empty(),
|
|
3296
|
+
failed: 1,
|
|
3297
|
+
tips: [tip],
|
|
3298
|
+
items: [{ label: "\u5DE5\u4F5C\u533A", outcome: "failed", detail: tip }]
|
|
3299
|
+
};
|
|
3300
|
+
}
|
|
3301
|
+
if (!projectBaseBranch) {
|
|
3302
|
+
const tip = "\u9879\u76EE\u672A\u914D\u7F6E\u57FA\u7840\u5206\u652F\uFF0C\u65E0\u6CD5\u6309\u57FA\u7EBF\u5339\u914D\u5E73\u53F0\u4ED3\u5E93";
|
|
3303
|
+
console.warn(`[apm] WebIDE PR\uFF1A${tip}`);
|
|
3304
|
+
return {
|
|
3305
|
+
...empty(),
|
|
3306
|
+
failed: 1,
|
|
3307
|
+
tips: [tip],
|
|
3308
|
+
items: [{ label: "\u5DE5\u4F5C\u533A", outcome: "failed", detail: tip }]
|
|
3309
|
+
};
|
|
3310
|
+
}
|
|
3287
3311
|
const expectedHead = `feat/task-${taskId}`;
|
|
3288
3312
|
console.log(
|
|
3289
|
-
`[apm] WebIDE PR\uFF1A\u51C6\u5907\u68C0\u67E5 ${repoRoots.length} \u4E2A\u4ED3\u5E93\uFF08\u671F\u671B\u7279\u6027\u5206\u652F ${expectedHead}\uFF09`
|
|
3313
|
+
`[apm] WebIDE PR\uFF1A\u51C6\u5907\u68C0\u67E5 ${repoRoots.length} \u4E2A\u4ED3\u5E93\uFF08\u671F\u671B\u7279\u6027\u5206\u652F ${expectedHead}\uFF0C\u9879\u76EE\u57FA\u7EBF ${projectBaseBranch}\uFF09`
|
|
3290
3314
|
);
|
|
3291
3315
|
let ensured = 0;
|
|
3292
3316
|
let skipped = 0;
|
|
@@ -3339,10 +3363,13 @@ async function ensureWebIdePullRequests(cfg, taskId, workdir) {
|
|
|
3339
3363
|
});
|
|
3340
3364
|
continue;
|
|
3341
3365
|
}
|
|
3342
|
-
const matched = await api.cli.matchRepository({
|
|
3366
|
+
const matched = await api.cli.matchRepository({
|
|
3367
|
+
url: originUrl,
|
|
3368
|
+
baseBranch: projectBaseBranch
|
|
3369
|
+
});
|
|
3343
3370
|
const repositoryId = matched.repositoryId?.trim();
|
|
3344
3371
|
if (!repositoryId) {
|
|
3345
|
-
const tip = `${label}\uFF1A\u5E73\u53F0\u672A\
|
|
3372
|
+
const tip = `${label}\uFF1A\u5E73\u53F0\u672A\u627E\u5230\u4ED3\u5E93\uFF08remote=${originUrl}\uFF0C\u57FA\u7EBF=${projectBaseBranch}\uFF09`;
|
|
3346
3373
|
console.warn(`[apm] WebIDE PR\uFF1A\u8DF3\u8FC7 ${tip}`);
|
|
3347
3374
|
tips.push(tip);
|
|
3348
3375
|
skipped += 1;
|
|
@@ -3350,6 +3377,7 @@ async function ensureWebIdePullRequests(cfg, taskId, workdir) {
|
|
|
3350
3377
|
label,
|
|
3351
3378
|
outcome: "skipped",
|
|
3352
3379
|
headBranch,
|
|
3380
|
+
baseBranch: projectBaseBranch,
|
|
3353
3381
|
detail: tip
|
|
3354
3382
|
});
|
|
3355
3383
|
continue;
|