next-issue 6.6.63 → 6.6.64

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 CHANGED
@@ -668,7 +668,9 @@ affect another. The worker:
668
668
  from GitHub, so the list is the same after a restart. It sends them when a
669
669
  client connects, for its repository, after each issue of a run
670
670
  ends, and when a client sends `{ "type": "questions", "root": "<path>" }`.
671
- An issue that no longer has the label leaves the list. An issue with the
671
+ An issue that no longer has the label leaves the list, and so does an issue
672
+ whose hand-over has an answer from a writer, the same answer that lets a run
673
+ claim it. An issue with the
672
674
  label but no hand-over comment is in the list with an empty reason and url.
673
675
  The issues are read one at a time. A client never gets an older list after
674
676
  a newer one. When the client adds an `"id"` to its message, the list that
@@ -46,12 +46,24 @@ export async function waitingQuestions(repo, config, ports) {
46
46
  const issues = await ports.openIssues(repo, config.issueLimit, [config.labels.needsHuman]);
47
47
  const questions = [];
48
48
  for (const issue of issues) {
49
- questions.push(await waitingQuestion(repo, config, ports, writer, issue));
49
+ const question = await waitingQuestion(repo, config, ports, writer, issue);
50
+ if (question) {
51
+ questions.push(question);
52
+ }
50
53
  }
51
54
  return questions;
52
55
  }
56
+ async function replyAfter(comments, last, writer) {
57
+ if (last === -1) {
58
+ return [];
59
+ }
60
+ return writerQuotes(comments.slice(last + 1).filter((comment) => !fromHarness(comment)), writer);
61
+ }
53
62
  async function waitingQuestion(repo, config, ports, writer, issue) {
54
63
  const { comments, last } = await handOverThread(repo, ports, writer, issue.number);
64
+ if ((await replyAfter(comments, last, writer)).length > 0) {
65
+ return undefined;
66
+ }
55
67
  const comment = comments[last];
56
68
  return {
57
69
  issue: issue.number,
@@ -71,8 +83,5 @@ export async function handOverReply(context, issue) {
71
83
  const { repo, ports } = context;
72
84
  const writer = writers(repo, ports);
73
85
  const { comments, last } = await handOverThread(repo, ports, writer, issue);
74
- if (last === -1) {
75
- return [];
76
- }
77
- return writerQuotes(comments.slice(last + 1).filter((comment) => !fromHarness(comment)), writer);
86
+ return replyAfter(comments, last, writer);
78
87
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "6.6.63",
3
+ "version": "6.6.64",
4
4
  "description": "Autonomous issue harness driven by the pi SDK",
5
5
  "keywords": [
6
6
  "github",