next-issue 2.21.0 → 2.21.1
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/pipeline.mjs +5 -0
- package/dist/run.mjs +1 -5
- package/package.json +1 -1
package/dist/pipeline.mjs
CHANGED
|
@@ -33,6 +33,7 @@ export async function pendingIssues(context) {
|
|
|
33
33
|
const labels = ready.length === 0 ? [] : [ready, inProgress, inReview];
|
|
34
34
|
const issues = await ports.openIssues(repo, config.issueLimit, labels);
|
|
35
35
|
const listed = new Set(issues.map((issue) => issue.number));
|
|
36
|
+
let openCount = issues.length;
|
|
36
37
|
for (const number of await savedIssues(repo)) {
|
|
37
38
|
if (listed.has(number)) {
|
|
38
39
|
continue;
|
|
@@ -43,6 +44,9 @@ export async function pendingIssues(context) {
|
|
|
43
44
|
}
|
|
44
45
|
try {
|
|
45
46
|
const { open, ...issue } = await ports.viewIssue(repo, number);
|
|
47
|
+
if (open) {
|
|
48
|
+
openCount += 1;
|
|
49
|
+
}
|
|
46
50
|
if (saved === 'broken' ||
|
|
47
51
|
open ||
|
|
48
52
|
(saved.pr !== undefined && (await ports.prMerged(repo, saved.pr)))) {
|
|
@@ -55,6 +59,7 @@ export async function pendingIssues(context) {
|
|
|
55
59
|
.event('issue.error', { error: message(error) }, 'quiet');
|
|
56
60
|
}
|
|
57
61
|
}
|
|
62
|
+
context.recorder.event('issues', { open: openCount }, 'quiet');
|
|
58
63
|
return issues.sort((a, b) => a.createdAt.localeCompare(b.createdAt));
|
|
59
64
|
}
|
|
60
65
|
export async function processIssue(context, issue) {
|
package/dist/run.mjs
CHANGED
|
@@ -61,11 +61,7 @@ async function handle(args, config, repo, recorder, controls) {
|
|
|
61
61
|
log: recorder.logFile,
|
|
62
62
|
}, 'quiet');
|
|
63
63
|
const loop = {
|
|
64
|
-
issues:
|
|
65
|
-
const issues = await pendingIssues(context);
|
|
66
|
-
recorder.event('issues', { open: issues.length }, 'quiet');
|
|
67
|
-
return issues;
|
|
68
|
-
},
|
|
64
|
+
issues: () => pendingIssues(context),
|
|
69
65
|
process: (issue) => processIssue(context, issue),
|
|
70
66
|
stop: interrupts.afterIssue,
|
|
71
67
|
concurrency: config.concurrency,
|