@docupace/pipeline 1.0.81-alpha.3 → 1.0.81-alpha.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.
- package/package.json +1 -1
- package/src/merge/cli-merge-all.js +12 -3
- package/src/merge/cli-merge.js +14 -3
package/package.json
CHANGED
|
@@ -226,6 +226,10 @@ async function runPreparePhase(
|
|
|
226
226
|
case 4:
|
|
227
227
|
console.log(`✅ ${configName}: No Changes`);
|
|
228
228
|
break;
|
|
229
|
+
case 5:
|
|
230
|
+
console.log(`❌ Stopping Merge`);
|
|
231
|
+
process.exit(1);
|
|
232
|
+
break;
|
|
229
233
|
default:
|
|
230
234
|
console.log(
|
|
231
235
|
`❌ ${configName}: Unknown error (exit code: ${result.exitCode})`,
|
|
@@ -382,7 +386,7 @@ async function mergeAll(verbose = false) {
|
|
|
382
386
|
config.repositories,
|
|
383
387
|
);
|
|
384
388
|
|
|
385
|
-
if (existingPRs.length > 0) {
|
|
389
|
+
/*if (existingPRs.length > 0) {
|
|
386
390
|
console.log(
|
|
387
391
|
`❌ Found ${existingPRs.length} existing pull request(s) with "Automated merge with changeset" description. Exiting to prevent conflicts.`,
|
|
388
392
|
);
|
|
@@ -394,7 +398,7 @@ async function mergeAll(verbose = false) {
|
|
|
394
398
|
});
|
|
395
399
|
}
|
|
396
400
|
process.exit(1);
|
|
397
|
-
}
|
|
401
|
+
}*/
|
|
398
402
|
|
|
399
403
|
if (verbose)
|
|
400
404
|
console.log('✅ No existing automated merge PRs found. Proceeding...');
|
|
@@ -428,7 +432,12 @@ async function mergeAll(verbose = false) {
|
|
|
428
432
|
verbose,
|
|
429
433
|
);
|
|
430
434
|
|
|
431
|
-
if (
|
|
435
|
+
if (
|
|
436
|
+
branchResult.success &&
|
|
437
|
+
branchResult.summary.successes > 0 &&
|
|
438
|
+
i < config.mergeBranches.length - 1
|
|
439
|
+
) {
|
|
440
|
+
console.log('Pausing before next merge');
|
|
432
441
|
await new Promise((res) => setTimeout(res, 90000));
|
|
433
442
|
}
|
|
434
443
|
|
package/src/merge/cli-merge.js
CHANGED
|
@@ -66,6 +66,17 @@ function attemptMerge(sourceBranch, targetBranch, verbose = false) {
|
|
|
66
66
|
console.log(`🔀 Merging ${sourceBranch} into current branch`);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
// Fetch and pull the source branch
|
|
70
|
+
try {
|
|
71
|
+
execSync(`git fetch origin ${sourceBranch}`, {
|
|
72
|
+
stdio: verbose ? 'inherit' : 'pipe',
|
|
73
|
+
});
|
|
74
|
+
if (verbose) console.log(`📥 Fetched source branch: ${sourceBranch}`);
|
|
75
|
+
} catch (error) {
|
|
76
|
+
if (verbose)
|
|
77
|
+
console.log(`⚠️ Failed to fetch ${sourceBranch}: ${error.message}`);
|
|
78
|
+
}
|
|
79
|
+
|
|
69
80
|
try {
|
|
70
81
|
execSync(`git merge --no-commit --no-ff origin/${sourceBranch}`, {
|
|
71
82
|
stdio: 'pipe',
|
|
@@ -229,7 +240,6 @@ function mergeIntoTarget(
|
|
|
229
240
|
|
|
230
241
|
// Delete remote merge branch
|
|
231
242
|
try {
|
|
232
|
-
console.log('About to delete remote branch');
|
|
233
243
|
execSync(`git push origin --delete ${mergeBranchName}`, {
|
|
234
244
|
stdio: 'pipe',
|
|
235
245
|
});
|
|
@@ -318,9 +328,10 @@ function checkForUncommittedChangesets(sourceBranch, verbose = false) {
|
|
|
318
328
|
).trim();
|
|
319
329
|
|
|
320
330
|
if (changesetFiles) {
|
|
321
|
-
|
|
322
|
-
|
|
331
|
+
console.log(
|
|
332
|
+
`❌ Cannot merge a branch where version has not been bumped. Found changesets in ${sourceBranch}`,
|
|
323
333
|
);
|
|
334
|
+
process.exit(5);
|
|
324
335
|
}
|
|
325
336
|
} catch (error) {
|
|
326
337
|
if (error.message.includes('Cannot merge')) {
|