next-issue 6.6.32 → 6.6.33

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
@@ -137,9 +137,10 @@ the run handles one issue. For each issue:
137
137
  from another CI service count too. It leaves out the check runs of the
138
138
  GitHub Actions app, since it judges GitHub Actions by its workflow runs. A
139
139
  failed or errored commit status, or a check run that ends with
140
- `failure`, `timed_out` or `action_required`, fails the checks. When a check
141
- ends `cancelled` and none ends `success`, for example because a later push
142
- cancelled the workflow run, no check of the commit finished: the harness
140
+ `failure`, `timed_out` or `action_required`, fails the checks. When any check
141
+ ends `cancelled`, for example because a later push cancelled the workflow
142
+ run, that check never finished, even when another check (such as a release
143
+ workflow) ends `success`: the harness
143
144
  hands the issue to a person with the reason `main checks cancelled` and
144
145
  halts, and the issue stays open. A repository
145
146
  that reports no check keeps asking for `checkGraceSeconds`. A pending state
@@ -58,9 +58,7 @@ function baseState(runs) {
58
58
  if (!runs.every((entry) => entry.status === 'completed')) {
59
59
  return 'pending';
60
60
  }
61
- const cancelled = runs.some((entry) => entry.conclusion === 'cancelled');
62
- const succeeded = runs.some((entry) => entry.conclusion === 'success');
63
- return cancelled && !succeeded ? 'cancelled' : 'pass';
61
+ return runs.some((entry) => entry.conclusion === 'cancelled') ? 'cancelled' : 'pass';
64
62
  }
65
63
  export function waitForBaseChecks(repo, sha, options) {
66
64
  let checks = [];
package/dist/conflict.mjs CHANGED
@@ -8,7 +8,7 @@ export async function rebase(job) {
8
8
  const { config, ports, base } = context;
9
9
  const title = state.title ?? fallbackTitle(issue);
10
10
  const before = await ports.revision(worktree);
11
- const files = await log.step('rebase', { base }, () => ports.startMerge(worktree, base, config.remote));
11
+ const { target, files } = await log.step('rebase', { base }, () => ports.startMerge(worktree, base, config.remote));
12
12
  if (files !== undefined) {
13
13
  log.event('rebase.conflicts', { files }, 'quiet');
14
14
  const merged = await mergeBase(job, before, files);
@@ -18,7 +18,7 @@ export async function rebase(job) {
18
18
  state.title = title;
19
19
  }
20
20
  const merged = await ports.revision(worktree);
21
- const squashed = await commitWork(job, merged, title, 'fixer', (cwd, message) => ports.squashOnto(cwd, base, config.remote, message));
21
+ const squashed = await commitWork(job, merged, title, 'fixer', (cwd, message) => ports.squashOnto(cwd, target, message));
22
22
  if (!squashed) {
23
23
  return escalateAndFinish(job, `The change holds nothing that ${config.remote}/${base} does not already hold.`, 'empty change');
24
24
  }
package/dist/git-land.mjs CHANGED
@@ -1,9 +1,8 @@
1
1
  import { evenWhenStopped } from './children.mjs';
2
- import { fetchBase, git, isOnBase, oneFetchAtATime, remoteRef, revision, succeeds, } from './git.mjs';
2
+ import { fetchBase, git, isOnBase, oneFetchAtATime, revision, succeeds } from './git.mjs';
3
3
  import { commitEverything } from './git-commit.mjs';
4
4
  export const PUSH_TRIES = 3;
5
- export async function squashOnto(cwd, base, remote, message) {
6
- const target = remoteRef(remote, base);
5
+ export async function squashOnto(cwd, target, message) {
7
6
  if (await succeeds(cwd, ['diff', '--quiet', target])) {
8
7
  return false;
9
8
  }
@@ -5,17 +5,17 @@ import { commitEverything } from './git-commit.mjs';
5
5
  import { fetchBase, git, isAncestor, remoteRef, resetHard, succeeds } from './git.mjs';
6
6
  import { lines } from './text.mjs';
7
7
  export async function startMerge(cwd, base, remote) {
8
- const target = await fetchBase(cwd, base, remote);
8
+ const target = await git(cwd, ['rev-parse', await fetchBase(cwd, base, remote)]);
9
9
  const result = await run('git', ['merge', '--no-ff', '--no-commit', target], { cwd });
10
10
  if (succeeded(result)) {
11
- return (await merging(cwd)) ? [] : undefined;
11
+ return { target, files: (await merging(cwd)) ? [] : undefined };
12
12
  }
13
13
  const listed = await git(cwd, ['diff', '--name-only', '--diff-filter=U']);
14
14
  const files = lines(listed);
15
15
  if (files.length === 0) {
16
16
  throw new Error(`git merge ${target} failed: ${result.stderr.trim()}`);
17
17
  }
18
- return files;
18
+ return { target, files };
19
19
  }
20
20
  async function merging(cwd) {
21
21
  return succeeds(cwd, ['rev-parse', '--quiet', '--verify', 'MERGE_HEAD']);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "6.6.32",
3
+ "version": "6.6.33",
4
4
  "description": "Autonomous issue harness driven by the pi SDK",
5
5
  "keywords": [
6
6
  "github",