next-issue 2.4.2 → 2.4.3
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/README.md +2 -1
- package/dist/loop.mjs +8 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -378,7 +378,8 @@ A run without `--watch` ends when no unseen issue is left. With `--watch`, the
|
|
|
378
378
|
harness then waits, reads the open issues again and runs another pass, so it
|
|
379
379
|
picks up an issue that someone opens during the run, or one whose blocker
|
|
380
380
|
merges. Each pass tries every open issue again, also one that an earlier pass
|
|
381
|
-
skipped.
|
|
381
|
+
skipped. An issue that failed in an earlier pass is not tried again until the
|
|
382
|
+
next run.
|
|
382
383
|
|
|
383
384
|
The waits follow a fixed back-off in minutes: 1, 2, 3, 5, 10, then 10 from then
|
|
384
385
|
on. A pass that handles an issue, with any outcome other than `skipped`, resets
|
package/dist/loop.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export const BACK_OFF_MINUTES = [1, 2, 3, 5, 10];
|
|
2
|
-
export async function runIssues(args, loop) {
|
|
2
|
+
export async function runIssues(args, loop, seen = new Set()) {
|
|
3
3
|
const reports = [];
|
|
4
|
-
const seen = new Set();
|
|
5
4
|
while (args.max === undefined || handled(reports) < args.max) {
|
|
6
5
|
let issues;
|
|
7
6
|
try {
|
|
@@ -29,10 +28,16 @@ export async function runIssues(args, loop) {
|
|
|
29
28
|
export async function watchIssues(args, watch) {
|
|
30
29
|
const limit = args.once ? 1 : args.max;
|
|
31
30
|
const reports = [];
|
|
31
|
+
const failed = new Set();
|
|
32
32
|
let step = 0;
|
|
33
33
|
for (;;) {
|
|
34
|
-
const pass = await runIssues({ once: false, max: limit === undefined ? undefined : limit - handled(reports) }, watch);
|
|
34
|
+
const pass = await runIssues({ once: false, max: limit === undefined ? undefined : limit - handled(reports) }, watch, new Set(failed));
|
|
35
35
|
reports.push(...pass.reports);
|
|
36
|
+
for (const report of pass.reports) {
|
|
37
|
+
if (report.outcome === 'error') {
|
|
38
|
+
failed.add(report.issue);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
36
41
|
if (handled(pass.reports) > 0) {
|
|
37
42
|
await watch.passEnd(pass.reports);
|
|
38
43
|
step = 0;
|