next-issue 6.6.41 → 6.6.42
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/loop.mjs +8 -1
- package/package.json +1 -1
package/dist/loop.mjs
CHANGED
|
@@ -11,7 +11,7 @@ export async function runIssues(args, loop, seen = new Set()) {
|
|
|
11
11
|
for (;;) {
|
|
12
12
|
if (claiming && room()) {
|
|
13
13
|
try {
|
|
14
|
-
await claimIssues(loop, seen, running, room);
|
|
14
|
+
claiming = await claimIssues(loop, seen, running, room);
|
|
15
15
|
}
|
|
16
16
|
catch (failure) {
|
|
17
17
|
error = failure;
|
|
@@ -47,7 +47,13 @@ function loopResult(reports, stoppedAt, error) {
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
async function claimIssues(loop, seen, running, room) {
|
|
50
|
+
if (loop.stop()) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
50
53
|
const issues = await loop.issues();
|
|
54
|
+
if (loop.stop()) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
51
57
|
for (const issue of issues.filter((candidate) => !seen.has(candidate.number))) {
|
|
52
58
|
if (!room()) {
|
|
53
59
|
break;
|
|
@@ -55,6 +61,7 @@ async function claimIssues(loop, seen, running, room) {
|
|
|
55
61
|
seen.add(issue.number);
|
|
56
62
|
running.set(issue.number, loop.process(issue).then((report) => ({ issue: issue.number, report }), (failure) => ({ issue: issue.number, failure })));
|
|
57
63
|
}
|
|
64
|
+
return true;
|
|
58
65
|
}
|
|
59
66
|
export function exitCode(reports) {
|
|
60
67
|
return reports.some((report) => report.outcome === 'needs-human' || report.outcome === 'error')
|