next-issue 6.3.5 → 6.3.7
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/budget.mjs +2 -1
- package/dist/conflict.mjs +1 -2
- package/package.json +1 -1
package/dist/budget.mjs
CHANGED
|
@@ -4,10 +4,11 @@ const LIMITS = { ciFixes: 'maxCiFixes', reviewRounds: 'maxReviewRounds' };
|
|
|
4
4
|
export function budgetUse(job, budget) {
|
|
5
5
|
return { round: job.state[budget], limit: job.context.config[LIMITS[budget]] };
|
|
6
6
|
}
|
|
7
|
-
export async function spendBudget(job, budget, note, reason) {
|
|
7
|
+
export async function spendBudget(job, budget, note, reason, beforeHandOver) {
|
|
8
8
|
const { context, state } = job;
|
|
9
9
|
const { round, limit } = budgetUse(job, budget);
|
|
10
10
|
if (round >= limit) {
|
|
11
|
+
await beforeHandOver?.();
|
|
11
12
|
return escalateAndFinish(job, note, reason);
|
|
12
13
|
}
|
|
13
14
|
state[budget] += 1;
|
package/dist/conflict.mjs
CHANGED
|
@@ -27,9 +27,8 @@ async function mergeBase(job, before, files) {
|
|
|
27
27
|
const { context, worktree } = job;
|
|
28
28
|
const { config, ports, base } = context;
|
|
29
29
|
if (files.length > 0) {
|
|
30
|
-
const exhausted = await spendBudget(job, 'ciFixes', `The change conflicts with ${base}, and the limit of ${config.maxCiFixes} check fixes was reached.`, 'merge conflict');
|
|
30
|
+
const exhausted = await spendBudget(job, 'ciFixes', `The change conflicts with ${base}, and the limit of ${config.maxCiFixes} check fixes was reached.`, 'merge conflict', () => ports.abortMerge(worktree, before));
|
|
31
31
|
if (exhausted) {
|
|
32
|
-
await ports.abortMerge(worktree, before);
|
|
33
32
|
return exhausted;
|
|
34
33
|
}
|
|
35
34
|
}
|