next-issue 7.8.13 → 7.8.14

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
@@ -256,8 +256,11 @@ the run handles one issue. For each issue:
256
256
  was rerun, a run that waits for approval, a check from another CI
257
257
  service) waits until every check has finished, so a workflow run that
258
258
  fails later, even after the first rerun started, still gets its own
259
- rerun before any fixer. A rerun that GitHub refuses because the run
260
- is already running counts as started. When at least one run restarted
259
+ rerun before any fixer. A workflow run whose kept job failed while a
260
+ job in `ignoredChecks` still runs gets its rerun only once the whole
261
+ run has finished on GitHub, as GitHub refuses to rerun a running run.
262
+ A rerun that GitHub refuses because the run is already running counts
263
+ as started. When at least one run restarted
261
264
  and a later rerun or read fails, the event carries the error and the
262
265
  harness still waits for the checks again, counting each restarted run as
263
266
  running until a later attempt of it completes, so the fixer never runs
@@ -25,7 +25,7 @@ async function baseRuns(repo, sha, branch, ignored) {
25
25
  const judged = await Promise.all(pushed.map((entry) => withoutIgnored(repo, entry, ignored)));
26
26
  return judged.filter((entry) => entry !== undefined);
27
27
  }
28
- /** Judges a workflow run by its jobs outside the ignored checks; a run with no job yet, or a running one whose listed jobs all finished, keeps its own state, as a job not listed yet may follow. */
28
+ /** Judges a workflow run by its jobs outside the ignored checks; a run with no job yet, or a running one whose listed jobs all finished, keeps its own state, as a job not listed yet may follow. A running one whose kept jobs failed waits until it finishes, as GitHub refuses to rerun a running run. */
29
29
  async function withoutIgnored(repo, run, ignored) {
30
30
  const jobs = jsonLines(await ghApi(repo, `actions/runs/${run.databaseId}/jobs?filter=latest&per_page=100`, '.jobs[] | {databaseId: .id, name, status, conclusion: (.conclusion // "")} | @json', { paginate: true }));
31
31
  if (jobs.length === 0 || (run.status !== 'completed' && jobs.every(completedJob))) {
@@ -38,7 +38,11 @@ async function withoutIgnored(repo, run, ignored) {
38
38
  if (!kept.every(completedJob)) {
39
39
  return { ...run, status: 'in_progress', conclusion: '', jobs: kept };
40
40
  }
41
- return { ...run, status: 'completed', conclusion: jobsConclusion(kept), jobs: kept };
41
+ const judged = { ...run, status: 'completed', conclusion: jobsConclusion(kept), jobs: kept };
42
+ if (run.status !== 'completed' && rerunnable(judged)) {
43
+ return { ...run, status: 'in_progress', conclusion: '', jobs: kept };
44
+ }
45
+ return judged;
42
46
  }
43
47
  function completedJob(job) {
44
48
  return job.status === 'completed';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "7.8.13",
3
+ "version": "7.8.14",
4
4
  "description": "Autonomous issue harness driven by the pi SDK",
5
5
  "keywords": [
6
6
  "github",