next-issue 6.6.13 → 6.6.15

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/gate.mjs CHANGED
@@ -5,7 +5,7 @@ import { asError, message } from './errors.mjs';
5
5
  import { escalateCheckFix, fixRound } from './fix.mjs';
6
6
  import { escalateAndFinish } from './handover.mjs';
7
7
  import { GATE_FIXED, GATE_PASSED } from './job.mjs';
8
- import { revert } from './revert.mjs';
8
+ import { revertOrReport, sentence } from './revert.mjs';
9
9
  import { writeState } from './state.mjs';
10
10
  export async function checkGate(job, sha) {
11
11
  const { base } = job.context;
@@ -82,18 +82,3 @@ export async function escalateError(job, error, note, reason) {
82
82
  const reverted = await revertOrReport(job);
83
83
  return escalateAndFinish(job, `${note}: ${sentence(message(error))}${reverted}`, reason);
84
84
  }
85
- async function revertOrReport(job) {
86
- try {
87
- return await revert(job);
88
- }
89
- catch (error) {
90
- if (runStopped()) {
91
- throw error;
92
- }
93
- job.repairing = false;
94
- return ` The revert of the change on ${job.context.base} failed: ${sentence(message(error))} The landed commits stay on ${job.context.base}.`;
95
- }
96
- }
97
- function sentence(text) {
98
- return text.endsWith('.') ? text : `${text}.`;
99
- }
package/dist/revert.mjs CHANGED
@@ -1,10 +1,27 @@
1
+ import { runStopped } from './children.mjs';
2
+ import { message } from './errors.mjs';
1
3
  import { writeState } from './state.mjs';
2
4
  export async function revertFailedFix(job) {
3
5
  if (!job.repairing || (job.state.landed ?? []).length === 0) {
4
6
  return '';
5
7
  }
6
8
  job.repairing = false;
7
- return revert(job);
9
+ return revertOrReport(job);
10
+ }
11
+ export async function revertOrReport(job) {
12
+ try {
13
+ return await revert(job);
14
+ }
15
+ catch (error) {
16
+ if (runStopped()) {
17
+ throw error;
18
+ }
19
+ job.repairing = false;
20
+ return ` The revert of the change on ${job.context.base} failed: ${sentence(message(error))} The landed commits stay on ${job.context.base}.`;
21
+ }
22
+ }
23
+ export function sentence(text) {
24
+ return text.endsWith('.') ? text : `${text}.`;
8
25
  }
9
26
  export async function revert(job) {
10
27
  const { context, issue, log, state, branch, worktree } = job;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "6.6.13",
3
+ "version": "6.6.15",
4
4
  "description": "Autonomous issue harness driven by the pi SDK",
5
5
  "keywords": [
6
6
  "github",