next-issue 6.6.33 → 6.6.35

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.
@@ -21,7 +21,7 @@ export function withoutClosingReferences(subject, fallback) {
21
21
  return cleaned || fallback;
22
22
  }
23
23
  export function parseCommitSubject(text, fallback) {
24
- const subject = lastMatch(text, /^commit:\s*(.+)$/gim)
24
+ const subject = lastMatch(text, /^commit:[^\S\r\n]*(.*)$/gim)
25
25
  ?.replace(/^`+|`+$/g, '')
26
26
  .trim();
27
27
  return subject || fallback;
@@ -1,28 +1,22 @@
1
1
  import { setTimeout as delay } from 'node:timers/promises';
2
2
  import { pollChecks } from './check-poll.mjs';
3
3
  import { secondsToMs } from './durations.mjs';
4
- import { gh, ghApi, ghJson } from './gh.mjs';
4
+ import { gh, ghApi } from './gh.mjs';
5
5
  import { runLogs } from './run-logs.mjs';
6
6
  const RESTART_TRIES = 10;
7
7
  const ACTIONS_APP = 'github-actions';
8
8
  const FAILED_STATES = new Set(['failure', 'error']);
9
9
  const FAILED_CONCLUSIONS = new Set(['failure', 'timed_out', 'startup_failure']);
10
- async function baseRuns(repo, sha) {
11
- return ghJson(repo, [
12
- 'run',
13
- 'list',
14
- '--commit',
15
- sha,
16
- '--json',
17
- 'databaseId,name,status,conclusion,attempt',
18
- ]);
19
- }
20
10
  function jsonLines(raw) {
21
11
  return raw
22
12
  .split('\n')
23
13
  .filter((line) => line.trim() !== '')
24
14
  .map((line) => JSON.parse(line));
25
15
  }
16
+ async function baseRuns(repo, sha) {
17
+ const runs = await ghApi(repo, `actions/runs?head_sha=${sha}&per_page=100`, '.workflow_runs[] | {databaseId: .id, name, status, conclusion: (.conclusion // ""), attempt: .run_attempt} | @json', { paginate: true });
18
+ return jsonLines(runs);
19
+ }
26
20
  async function externalChecks(repo, sha) {
27
21
  const [runs, statuses] = await Promise.all([
28
22
  ghApi(repo, `commits/${sha}/check-runs?per_page=100`, '.check_runs[] | {name, status, conclusion, app: .app.slug, url: .details_url} | @json', { paginate: true }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "6.6.33",
3
+ "version": "6.6.35",
4
4
  "description": "Autonomous issue harness driven by the pi SDK",
5
5
  "keywords": [
6
6
  "github",