@idea1/cli 1.8.1 → 1.8.3
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 +93 -19
- package/dist/commands/approve-pr.js +5 -5
- package/dist/commands/approve-pr.js.map +1 -1
- package/dist/commands/attach-project-item.d.ts.map +1 -1
- package/dist/commands/attach-project-item.js +27 -7
- package/dist/commands/attach-project-item.js.map +1 -1
- package/dist/commands/help.d.ts.map +1 -1
- package/dist/commands/help.js +8 -6
- package/dist/commands/help.js.map +1 -1
- package/dist/commands/index.d.ts +2 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +3 -1
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/integrate.d.ts +13 -0
- package/dist/commands/integrate.d.ts.map +1 -0
- package/dist/commands/integrate.js +128 -0
- package/dist/commands/integrate.js.map +1 -0
- package/dist/commands/ready-for-approval.js +1 -1
- package/dist/commands/ready-for-approval.js.map +1 -1
- package/dist/commands/release.d.ts +4 -0
- package/dist/commands/release.d.ts.map +1 -1
- package/dist/commands/release.js +105 -20
- package/dist/commands/release.js.map +1 -1
- package/dist/commands/ship-local-changes.d.ts +8 -0
- package/dist/commands/ship-local-changes.d.ts.map +1 -0
- package/dist/commands/ship-local-changes.js +33 -0
- package/dist/commands/ship-local-changes.js.map +1 -0
- package/dist/commands/start-agent-implementation.d.ts.map +1 -1
- package/dist/commands/start-agent-implementation.js +8 -3
- package/dist/commands/start-agent-implementation.js.map +1 -1
- package/dist/commands/start-project-item.d.ts +27 -0
- package/dist/commands/start-project-item.d.ts.map +1 -0
- package/dist/commands/start-project-item.js +325 -0
- package/dist/commands/start-project-item.js.map +1 -0
- package/dist/commands/start.d.ts +6 -0
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +53 -18
- package/dist/commands/start.js.map +1 -1
- package/dist/index.js +0 -0
- package/dist/lib/claude-options.d.ts +3 -2
- package/dist/lib/claude-options.d.ts.map +1 -1
- package/dist/lib/claude-options.js +15 -4
- package/dist/lib/claude-options.js.map +1 -1
- package/dist/lib/settings.d.ts +13 -3
- package/dist/lib/settings.d.ts.map +1 -1
- package/dist/lib/settings.js +12 -3
- package/dist/lib/settings.js.map +1 -1
- package/dist/prompts/platform-prompts.d.ts +1 -0
- package/dist/prompts/platform-prompts.d.ts.map +1 -1
- package/dist/prompts/platform-prompts.js +7 -1
- package/dist/prompts/platform-prompts.js.map +1 -1
- package/dist/services/git.d.ts +34 -13
- package/dist/services/git.d.ts.map +1 -1
- package/dist/services/git.js +75 -39
- package/dist/services/git.js.map +1 -1
- package/dist/services/github.d.ts +15 -0
- package/dist/services/github.d.ts.map +1 -1
- package/dist/services/github.js +47 -0
- package/dist/services/github.js.map +1 -1
- package/dist/services/platform.d.ts +9 -4
- package/dist/services/platform.d.ts.map +1 -1
- package/dist/services/platform.js +10 -5
- package/dist/services/platform.js.map +1 -1
- package/dist/services/setup.d.ts.map +1 -1
- package/dist/services/setup.js +18 -24
- package/dist/services/setup.js.map +1 -1
- package/dist/services/workflow.d.ts +17 -0
- package/dist/services/workflow.d.ts.map +1 -0
- package/dist/services/workflow.js +39 -0
- package/dist/services/workflow.js.map +1 -0
- package/dist/types/index.d.ts +18 -24
- package/dist/types/index.d.ts.map +1 -1
- package/dist/version.d.ts +2 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +3 -2
- package/dist/version.js.map +1 -1
- package/dist/workflow/engine/approval-flow.d.ts +8 -1
- package/dist/workflow/engine/approval-flow.d.ts.map +1 -1
- package/dist/workflow/engine/approval-flow.js +23 -8
- package/dist/workflow/engine/approval-flow.js.map +1 -1
- package/dist/workflow/engine/handlers/agent-implementation.d.ts +2 -1
- package/dist/workflow/engine/handlers/agent-implementation.d.ts.map +1 -1
- package/dist/workflow/engine/handlers/agent-implementation.js +12 -3
- package/dist/workflow/engine/handlers/agent-implementation.js.map +1 -1
- package/dist/workflow/engine/handlers/approve-pr.d.ts.map +1 -1
- package/dist/workflow/engine/handlers/approve-pr.js +11 -5
- package/dist/workflow/engine/handlers/approve-pr.js.map +1 -1
- package/dist/workflow/engine/handlers/dev-implementation.d.ts +2 -1
- package/dist/workflow/engine/handlers/dev-implementation.d.ts.map +1 -1
- package/dist/workflow/engine/handlers/dev-implementation.js +10 -2
- package/dist/workflow/engine/handlers/dev-implementation.js.map +1 -1
- package/dist/workflow/engine/handlers/ready-for-approval.d.ts +7 -1
- package/dist/workflow/engine/handlers/ready-for-approval.d.ts.map +1 -1
- package/dist/workflow/engine/handlers/ready-for-approval.js +21 -9
- package/dist/workflow/engine/handlers/ready-for-approval.js.map +1 -1
- package/dist/workflow/engine/{release-flow.d.ts → release-engine.d.ts} +77 -6
- package/dist/workflow/engine/release-engine.d.ts.map +1 -0
- package/dist/workflow/engine/{release-flow.js → release-engine.js} +279 -17
- package/dist/workflow/engine/release-engine.js.map +1 -0
- package/dist/workflow/engine/ship-flow.d.ts +87 -0
- package/dist/workflow/engine/ship-flow.d.ts.map +1 -0
- package/dist/workflow/engine/ship-flow.js +227 -0
- package/dist/workflow/engine/ship-flow.js.map +1 -0
- package/dist/workflow/engine/workflow-engine.d.ts +29 -5
- package/dist/workflow/engine/workflow-engine.d.ts.map +1 -1
- package/dist/workflow/engine/workflow-engine.js +87 -23
- package/dist/workflow/engine/workflow-engine.js.map +1 -1
- package/package.json +2 -2
- package/dist/workflow/engine/release-flow.d.ts.map +0 -1
- package/dist/workflow/engine/release-flow.js.map +0 -1
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { existsSync, readFileSync, writeFileSync } from 'fs';
|
|
2
|
+
import { join } from 'path';
|
|
1
3
|
import { logger } from '../../lib/logger.js';
|
|
4
|
+
import { readReleaseSettings } from '../../lib/settings.js';
|
|
2
5
|
import { exec, execOrThrow } from '../../lib/shell.js';
|
|
3
6
|
import { promptConfirm, promptInput } from '../../lib/prompt.js';
|
|
4
7
|
import * as git from '../../services/git.js';
|
|
@@ -8,7 +11,8 @@ export const CHANGE_KIND = { commandName: 'idea1 ready-for-approval', label: 'Ch
|
|
|
8
11
|
/**
|
|
9
12
|
* The `--pr-mode` option of `idea1 release`. `create` is the default: the PR is opened and the
|
|
10
13
|
* approver merges it in GitHub once the required checks are green - that merge is the approval of
|
|
11
|
-
* record, exactly as in `merge` mode, where the CLI
|
|
14
|
+
* record, exactly as in `merge` mode, where the CLI turns on GitHub's auto-merge on the approver's
|
|
15
|
+
* behalf (or, where GitHub can't auto-merge, waits for the checks and merges here).
|
|
12
16
|
*/
|
|
13
17
|
export const PR_MODE_OPTION = {
|
|
14
18
|
longName: 'pr-mode',
|
|
@@ -18,7 +22,7 @@ export const PR_MODE_OPTION = {
|
|
|
18
22
|
promptWhenDefaultExists: true,
|
|
19
23
|
choices: [
|
|
20
24
|
{ label: 'create - Create the PR and open it in the browser; merge it there once the required checks pass', value: 'create' },
|
|
21
|
-
{ label: 'merge -
|
|
25
|
+
{ label: 'merge - Enable auto-merge so GitHub merges once the required checks pass (or wait for the checks with gh and merge here)', value: 'merge' }
|
|
22
26
|
]
|
|
23
27
|
};
|
|
24
28
|
/** The first line of the comment that records an admin override; the evidence script keys on it. */
|
|
@@ -30,6 +34,13 @@ export const OVERRIDE_COMMENT_MARKER = '**Change-management exception: merged wi
|
|
|
30
34
|
* the two separately.
|
|
31
35
|
*/
|
|
32
36
|
export const UNAPPROVED_COMMITS_COMMENT_MARKER = '**Change-management exception: released with commits that had no pull request.**';
|
|
37
|
+
/**
|
|
38
|
+
* The first line of the comment that records a release approved in the Idea1 web app. A web merge,
|
|
39
|
+
* or a web-enabled auto-merge, is performed by the Idea1 GitHub App, so GitHub records the app as
|
|
40
|
+
* `merged_by`; the platform posts this comment, naming the approver, before the merge happens, and
|
|
41
|
+
* the evidence script keys on it to attribute the merge to that approver.
|
|
42
|
+
*/
|
|
43
|
+
export const RELEASE_APPROVAL_COMMENT_MARKER = '**Change-management approval: release approved in Idea1.**';
|
|
33
44
|
/**
|
|
34
45
|
* The local checkout must be the source branch, clean, fully pushed and level with origin, so the
|
|
35
46
|
* PR carries exactly what the person running the command is looking at.
|
|
@@ -72,6 +83,175 @@ export async function validateSourceBranch(sourceBranch) {
|
|
|
72
83
|
logger.success('Local branch matches remote');
|
|
73
84
|
logger.newline();
|
|
74
85
|
}
|
|
86
|
+
export const VERSION_BUMP_TYPES = ['patch', 'minor', 'major'];
|
|
87
|
+
/** The subject prefix of the commit a version bump makes, which both the CLI and the platform write. */
|
|
88
|
+
const VERSION_BUMP_SUBJECT_PREFIX = 'chore: bump ';
|
|
89
|
+
/** The tree of `path` at `origin/<branch>`, or null when the branch has no such path. */
|
|
90
|
+
async function readRemoteTreeSha(branch, path) {
|
|
91
|
+
const result = await exec('git', ['rev-parse', '--verify', '--quiet', `origin/${branch}:${path}`]);
|
|
92
|
+
return result.exitCode === 0 ? result.stdout.trim() : null;
|
|
93
|
+
}
|
|
94
|
+
/** The `version` of `<path>/package.json` at `origin/<branch>`, or null when it has none. */
|
|
95
|
+
async function readRemotePackageVersion(branch, path) {
|
|
96
|
+
const result = await exec('git', ['show', `origin/${branch}:${path}/package.json`]);
|
|
97
|
+
if (result.exitCode !== 0) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
return JSON.parse(result.stdout).version ?? null;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* The versioned packages the release still has to bump, read from origin's branches as last
|
|
104
|
+
* fetched. A package needs a bump when its folder changed between the target and the release
|
|
105
|
+
* branch and its package.json version is still the same on both - a version that already differs
|
|
106
|
+
* was bumped for this release, so re-running a release never bumps twice. The Idea1 web app applies
|
|
107
|
+
* the same rule.
|
|
108
|
+
*/
|
|
109
|
+
export async function detectPendingVersionBumps(packages, releaseBranch, targetBranch) {
|
|
110
|
+
const pending = [];
|
|
111
|
+
for (const pkg of packages) {
|
|
112
|
+
const releaseTree = await readRemoteTreeSha(releaseBranch, pkg.path);
|
|
113
|
+
const targetTree = await readRemoteTreeSha(targetBranch, pkg.path);
|
|
114
|
+
if (releaseTree === targetTree) {
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
const releaseVersion = await readRemotePackageVersion(releaseBranch, pkg.path);
|
|
118
|
+
const targetVersion = await readRemotePackageVersion(targetBranch, pkg.path);
|
|
119
|
+
if (releaseVersion === null || releaseVersion !== targetVersion) {
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
pending.push({ ...pkg, currentVersion: releaseVersion });
|
|
123
|
+
}
|
|
124
|
+
return pending;
|
|
125
|
+
}
|
|
126
|
+
/** The version a bump of `type` moves `current` to; only plain `major.minor.patch` versions are bumped. */
|
|
127
|
+
function nextVersion(current, type) {
|
|
128
|
+
const match = /^(\d+)\.(\d+)\.(\d+)$/.exec(current);
|
|
129
|
+
if (!match) {
|
|
130
|
+
throw new Error(`Cannot bump version '${current}': only plain major.minor.patch versions are bumped automatically. Bump it by hand.`);
|
|
131
|
+
}
|
|
132
|
+
const [major, minor, patch] = match.slice(1).map(Number);
|
|
133
|
+
switch (type) {
|
|
134
|
+
case 'major': return `${major + 1}.0.0`;
|
|
135
|
+
case 'minor': return `${major}.${minor + 1}.0`;
|
|
136
|
+
default: return `${major}.${minor}.${patch + 1}`;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function escapeRegExp(value) {
|
|
140
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
141
|
+
}
|
|
142
|
+
/** The `version` of the root object of `json`, or of the lockfile `packages` entry under `entryKey`. */
|
|
143
|
+
function readVersion(json, entryKey) {
|
|
144
|
+
const root = JSON.parse(json);
|
|
145
|
+
const version = entryKey === null ? root.version : root.packages?.[entryKey]?.version;
|
|
146
|
+
return typeof version === 'string' ? version : null;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* The JSON text with the `version` of one object replaced, and everything else byte for byte as it was.
|
|
150
|
+
*
|
|
151
|
+
* With a null `entryKey` the object is the document's root (a `package.json`, or a lockfile's own
|
|
152
|
+
* header); otherwise it is the object under that key (a lockfile's `packages` entry, where the empty
|
|
153
|
+
* key is the lockfile's root package). The `version` is the object's own property, found by its
|
|
154
|
+
* indentation, never one nested deeper such as a dependency's. Returns null when the object is not in
|
|
155
|
+
* the text or has no `version`, and throws when the edited text does not read back as the new version.
|
|
156
|
+
* The platform's `ReleaseEngine.SetVersion` makes the same edit.
|
|
157
|
+
*/
|
|
158
|
+
function setVersion(json, path, entryKey, version) {
|
|
159
|
+
let regionStart = 0;
|
|
160
|
+
let regionEnd = json.length;
|
|
161
|
+
if (entryKey !== null) {
|
|
162
|
+
const entry = new RegExp(`^([ \\t]*)"${escapeRegExp(entryKey)}"[ \\t]*:[ \\t]*\\{[ \\t]*\\r?$`, 'm').exec(json);
|
|
163
|
+
if (!entry) {
|
|
164
|
+
return null;
|
|
165
|
+
}
|
|
166
|
+
regionStart = entry.index + entry[0].length;
|
|
167
|
+
const close = new RegExp(`^${escapeRegExp(entry[1])}\\}`, 'm').exec(json.slice(regionStart));
|
|
168
|
+
regionEnd = close ? regionStart + close.index : json.length;
|
|
169
|
+
}
|
|
170
|
+
const region = json.slice(regionStart, regionEnd);
|
|
171
|
+
const firstProperty = /^([ \t]+)"/m.exec(region);
|
|
172
|
+
if (!firstProperty) {
|
|
173
|
+
return null;
|
|
174
|
+
}
|
|
175
|
+
const property = new RegExp(`^${escapeRegExp(firstProperty[1])}"version"[ \\t]*:[ \\t]*"([^"\\r\\n]*)"`, 'dm').exec(region);
|
|
176
|
+
if (!property?.indices) {
|
|
177
|
+
return null;
|
|
178
|
+
}
|
|
179
|
+
const [valueStart, valueEnd] = property.indices[1];
|
|
180
|
+
const edited = json.slice(0, regionStart + valueStart) + version + json.slice(regionStart + valueEnd);
|
|
181
|
+
if (readVersion(edited, entryKey) !== version) {
|
|
182
|
+
throw new Error(`Could not update the version in ${path}: it is not formatted the way npm writes it.`);
|
|
183
|
+
}
|
|
184
|
+
return edited;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Move one package to `version` in the working tree: its `package.json`, and each lockfile at or
|
|
188
|
+
* above its folder that records it. Returns the repo-relative paths of the files that changed.
|
|
189
|
+
*
|
|
190
|
+
* A lockfile in the package's own folder records the package as its root; a workspace root's
|
|
191
|
+
* lockfile records it as the entry for its path relative to the lockfile. These are the files
|
|
192
|
+
* `npm version` would touch, edited in place so nothing else in them changes.
|
|
193
|
+
*/
|
|
194
|
+
function writeVersionFiles(repoRoot, pkg, version) {
|
|
195
|
+
const changed = [];
|
|
196
|
+
const edit = (path, entryKeys) => {
|
|
197
|
+
const original = readFileSync(join(repoRoot, path), 'utf-8');
|
|
198
|
+
const content = entryKeys.reduce((current, entryKey) => setVersion(current, path, entryKey, version) ?? current, original);
|
|
199
|
+
if (content !== original) {
|
|
200
|
+
writeFileSync(join(repoRoot, path), content);
|
|
201
|
+
changed.push(path);
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
edit(`${pkg.path}/package.json`, [null]);
|
|
205
|
+
for (const directory of ancestorDirectories(pkg.path)) {
|
|
206
|
+
const lockfile = lockfilePath(directory);
|
|
207
|
+
if (existsSync(join(repoRoot, lockfile))) {
|
|
208
|
+
const relativePath = pkg.path.slice(directory.length).replace(/^\//, '');
|
|
209
|
+
edit(lockfile, relativePath === '' ? [null, ''] : [relativePath]);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return changed;
|
|
213
|
+
}
|
|
214
|
+
/** A folder and each folder above it, ending with the repository root (the empty path). */
|
|
215
|
+
function ancestorDirectories(directory) {
|
|
216
|
+
const directories = [];
|
|
217
|
+
for (let current = directory; current !== ''; current = current.includes('/') ? current.slice(0, current.lastIndexOf('/')) : '') {
|
|
218
|
+
directories.push(current);
|
|
219
|
+
}
|
|
220
|
+
return [...directories, ''];
|
|
221
|
+
}
|
|
222
|
+
const lockfilePath = (directory) => directory === '' ? 'package-lock.json' : `${directory}/package-lock.json`;
|
|
223
|
+
/**
|
|
224
|
+
* The version files of the declared packages: each package's `package.json` and the lockfiles at or
|
|
225
|
+
* above its folder, the files a version bump edits. The platform's `ReleaseEngine` applies the same set.
|
|
226
|
+
*/
|
|
227
|
+
function versionFilePaths(packages) {
|
|
228
|
+
return new Set(packages.flatMap(pkg => [`${pkg.path}/package.json`, ...ancestorDirectories(pkg.path).map(lockfilePath)]));
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Bump the versions of the pending packages in one commit on the release branch and push it, so
|
|
232
|
+
* the release PR opens against a branch that already carries them. The commit is `chore: bump
|
|
233
|
+
* <package> <version>, ...` and is made as whoever runs the command.
|
|
234
|
+
*/
|
|
235
|
+
export async function commitVersionBumps(options) {
|
|
236
|
+
const { releaseBranch, pending, bumps } = options;
|
|
237
|
+
const repoRoot = await git.getRepoRoot();
|
|
238
|
+
const missing = pending.filter(pkg => !(pkg.name in bumps)).map(pkg => pkg.label);
|
|
239
|
+
if (missing.length > 0) {
|
|
240
|
+
throw new Error(`Choose a version bump for: ${missing.join(', ')}.`);
|
|
241
|
+
}
|
|
242
|
+
const changedFiles = [];
|
|
243
|
+
const summary = [];
|
|
244
|
+
for (const pkg of pending) {
|
|
245
|
+
const version = nextVersion(pkg.currentVersion, bumps[pkg.name]);
|
|
246
|
+
changedFiles.push(...writeVersionFiles(repoRoot, pkg, version));
|
|
247
|
+
summary.push(`${pkg.name} ${version}`);
|
|
248
|
+
}
|
|
249
|
+
logger.step(`Committing the version bump to ${releaseBranch} (${summary.join(', ')})...`);
|
|
250
|
+
await execOrThrow('git', ['add', '--', ...changedFiles]);
|
|
251
|
+
await execOrThrow('git', ['commit', '-m', `${VERSION_BUMP_SUBJECT_PREFIX}${summary.join(', ')}`]);
|
|
252
|
+
await git.pushToRemote(releaseBranch);
|
|
253
|
+
logger.success('Versions bumped');
|
|
254
|
+
}
|
|
75
255
|
/**
|
|
76
256
|
* The commits that landed on the source branch since the target last caught up, first-parent
|
|
77
257
|
* only: one merge commit per merge-commit PR, one squash commit per squash PR, the rebased commits
|
|
@@ -102,13 +282,19 @@ function escapeTableCell(value) {
|
|
|
102
282
|
return value.replace(/\\/g, '\\\\').replace(/\|/g, '\\|');
|
|
103
283
|
}
|
|
104
284
|
/**
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
285
|
+
* Whether a commit only changes version files, which a release may commit straight onto the release
|
|
286
|
+
* branch with no pull request, whoever made it (`idea1 release` or the Idea1 web app). Such a commit
|
|
287
|
+
* is release automation rather than a change: counting it as an unapproved commit would refuse every
|
|
288
|
+
* release that bumps a version. A commit that touches any other file is not exempt, whatever it is
|
|
289
|
+
* called. The platform's `ReleaseEngine.ChangesOnlyVersionFilesAsync` applies the same rule.
|
|
109
290
|
*/
|
|
110
|
-
function
|
|
111
|
-
|
|
291
|
+
async function changesOnlyVersionFiles(commit, versionFiles) {
|
|
292
|
+
if (versionFiles.size === 0) {
|
|
293
|
+
return false;
|
|
294
|
+
}
|
|
295
|
+
const result = await exec('git', ['diff-tree', '--no-commit-id', '--name-only', '-r', commit.sha]);
|
|
296
|
+
const changedFiles = result.stdout.split('\n').filter(file => file.trim().length > 0);
|
|
297
|
+
return result.exitCode === 0 && changedFiles.length > 0 && changedFiles.every(file => versionFiles.has(file));
|
|
112
298
|
}
|
|
113
299
|
/**
|
|
114
300
|
* The refusal, and the one way past it. A release whose commits never went through a pull request
|
|
@@ -177,6 +363,7 @@ export async function buildApprovalChain(sourceBranch, targetBranch, kind) {
|
|
|
177
363
|
if (commits.length === 0) {
|
|
178
364
|
throw new Error(`Nothing to ${kind.label.toLowerCase()}: origin/${targetBranch} already contains everything on origin/${sourceBranch}.`);
|
|
179
365
|
}
|
|
366
|
+
const versionFiles = versionFilePaths((await readReleaseSettings(await git.getRepoRoot())).versionedPackages);
|
|
180
367
|
logger.step(`Attributing ${commits.length} commit(s) on ${sourceBranch} to their pull requests...`);
|
|
181
368
|
const prNumbers = new Set();
|
|
182
369
|
const versionBumps = [];
|
|
@@ -190,13 +377,13 @@ export async function buildApprovalChain(sourceBranch, targetBranch, kind) {
|
|
|
190
377
|
}
|
|
191
378
|
continue;
|
|
192
379
|
}
|
|
193
|
-
if (
|
|
380
|
+
if (await changesOnlyVersionFiles(commit, versionFiles)) {
|
|
194
381
|
versionBumps.push(commit);
|
|
195
382
|
continue;
|
|
196
383
|
}
|
|
197
384
|
unapprovedCommits.push(commit);
|
|
198
385
|
}
|
|
199
|
-
// A release of nothing but the
|
|
386
|
+
// A release of nothing but the version bump is a release of release automation:
|
|
200
387
|
// there is no unapproved change in it, so there is nothing to refuse. A change PR is never
|
|
201
388
|
// refused over direct commits: they are what its assignee reviews.
|
|
202
389
|
const exception = !kind.assigneeReviewsCommits && prNumbers.size === 0 && unapprovedCommits.length > 0
|
|
@@ -246,9 +433,9 @@ export async function buildApprovalChain(sourceBranch, targetBranch, kind) {
|
|
|
246
433
|
lines.push('');
|
|
247
434
|
lines.push('## Version bumps (release automation)');
|
|
248
435
|
lines.push('');
|
|
249
|
-
lines.push(`The commits below were
|
|
250
|
-
lines.push('
|
|
251
|
-
lines.push('and are not an exception under change-management-policy.md clause 2.');
|
|
436
|
+
lines.push(`The commits below were pushed to \`${sourceBranch}\` as part of cutting this release (\`idea1 release\` or the Idea1 web app).`);
|
|
437
|
+
lines.push('They only change version files (the `package.json` and lockfiles of the versioned packages), so they carry no');
|
|
438
|
+
lines.push('change of their own, have no pull request, and are not an exception under change-management-policy.md clause 2.');
|
|
252
439
|
lines.push('');
|
|
253
440
|
lines.push('| Commit | Author | Subject |');
|
|
254
441
|
lines.push('|---|---|---|');
|
|
@@ -393,6 +580,33 @@ export async function mergeWithCheckGate(branchName, kind) {
|
|
|
393
580
|
}
|
|
394
581
|
logger.success('Exception recorded on the PR');
|
|
395
582
|
}
|
|
583
|
+
/**
|
|
584
|
+
* GitHub's answers to an auto-merge request that mean auto-merge is not the way to merge this PR:
|
|
585
|
+
* it is already mergeable (nothing left to gate on), the repository doesn't allow auto-merge, or
|
|
586
|
+
* the base branch has no protection for auto-merge to wait on.
|
|
587
|
+
*/
|
|
588
|
+
const AUTO_MERGE_UNAVAILABLE = /\b(clean|unstable) status\b|auto.?merge is not allowed|protected branch rules not configured/i;
|
|
589
|
+
/**
|
|
590
|
+
* Merge the PR the way that records the person running this as `merged_by`, without them having to
|
|
591
|
+
* wait: GitHub's auto-merge, which merges once the required checks pass. Where GitHub can't
|
|
592
|
+
* auto-merge (the PR is already mergeable, or the repository doesn't allow auto-merge), it falls
|
|
593
|
+
* back to waiting for the checks here and merging (`mergeWithCheckGate`, with its admin-override
|
|
594
|
+
* path). Any other refusal throws.
|
|
595
|
+
*/
|
|
596
|
+
export async function enableAutoMergeOrPoll(branchName, kind) {
|
|
597
|
+
const result = await github.enablePrAutoMerge(branchName);
|
|
598
|
+
if (result.success) {
|
|
599
|
+
logger.success('Auto-merge enabled: GitHub merges the PR once the required checks pass, recording you as the merger.');
|
|
600
|
+
return 'auto-merge-enabled';
|
|
601
|
+
}
|
|
602
|
+
const error = result.error ?? '';
|
|
603
|
+
if (!AUTO_MERGE_UNAVAILABLE.test(error)) {
|
|
604
|
+
throw new Error(`Could not enable auto-merge on the PR for ${branchName}: ${error}`);
|
|
605
|
+
}
|
|
606
|
+
logger.dim(`GitHub can't auto-merge this PR (${error.split('\n')[0]}) - waiting for the checks and merging here instead.`);
|
|
607
|
+
await mergeWithCheckGate(branchName, kind);
|
|
608
|
+
return 'merged';
|
|
609
|
+
}
|
|
396
610
|
/**
|
|
397
611
|
* Open URL in browser (cross-platform)
|
|
398
612
|
*/
|
|
@@ -420,7 +634,9 @@ async function openGitHubActions() {
|
|
|
420
634
|
/**
|
|
421
635
|
* Finish the sequence in the chosen mode. Either way the merge is the approval of record: in
|
|
422
636
|
* `create` mode the approver performs it in GitHub once the checks are green; in `merge` mode the
|
|
423
|
-
* CLI
|
|
637
|
+
* CLI turns on GitHub's auto-merge as the approver, so GitHub merges once the checks pass and
|
|
638
|
+
* records the approver as the merger - or, where GitHub can't auto-merge, waits for the checks and
|
|
639
|
+
* merges here.
|
|
424
640
|
*/
|
|
425
641
|
export async function runPrMode(options) {
|
|
426
642
|
const { mode, sourceBranch, targetBranch, prUrl, kind } = options;
|
|
@@ -442,9 +658,19 @@ export async function runPrMode(options) {
|
|
|
442
658
|
logger.hint(`PR: ${prUrl}`);
|
|
443
659
|
return;
|
|
444
660
|
}
|
|
445
|
-
await
|
|
661
|
+
const outcome = await enableAutoMergeOrPoll(sourceBranch, kind);
|
|
446
662
|
logger.newline();
|
|
447
|
-
|
|
663
|
+
await reportMergeOutcome(outcome, kind, targetBranch, prUrl, options.openActionsAfterMerge);
|
|
664
|
+
}
|
|
665
|
+
async function reportMergeOutcome(outcome, kind, targetBranch, prUrl, openActionsAfterMerge) {
|
|
666
|
+
if (outcome === 'auto-merge-enabled') {
|
|
667
|
+
logger.success('================================================');
|
|
668
|
+
logger.success(`${kind.label} PR will merge to ${targetBranch} once the required checks pass`);
|
|
669
|
+
logger.success('================================================');
|
|
670
|
+
logger.hint(`Follow it on the PR: ${prUrl}`);
|
|
671
|
+
return;
|
|
672
|
+
}
|
|
673
|
+
if (openActionsAfterMerge) {
|
|
448
674
|
await openGitHubActions();
|
|
449
675
|
logger.newline();
|
|
450
676
|
}
|
|
@@ -452,4 +678,40 @@ export async function runPrMode(options) {
|
|
|
452
678
|
logger.success(`${kind.label} merge to ${targetBranch} complete!`);
|
|
453
679
|
logger.success('========================================');
|
|
454
680
|
}
|
|
455
|
-
|
|
681
|
+
/**
|
|
682
|
+
* `idea1 release --approve`: approve and merge the open release PR from the source branch into the
|
|
683
|
+
* target, as its approver. With every check passed it merges now; with checks still running it
|
|
684
|
+
* turns on auto-merge (or waits and merges where GitHub can't auto-merge); with a failed check it
|
|
685
|
+
* goes to the gate's admin-override path, which refuses unless the override is confirmed, reasoned
|
|
686
|
+
* and recorded.
|
|
687
|
+
*/
|
|
688
|
+
export async function approveRelease(sourceBranch, targetBranch) {
|
|
689
|
+
const pr = await github.checkPrExists(sourceBranch, targetBranch);
|
|
690
|
+
if (!pr) {
|
|
691
|
+
throw new Error(`There is no open release PR from ${sourceBranch} into ${targetBranch}. Run idea1 release to open one.`);
|
|
692
|
+
}
|
|
693
|
+
logger.info(`Release PR #${pr.number}: ${pr.url}`);
|
|
694
|
+
await confirmApproverIdentity(sourceBranch);
|
|
695
|
+
const checkState = await github.getPrCheckState(sourceBranch);
|
|
696
|
+
logger.info(`Checks: ${checkState}`);
|
|
697
|
+
let outcome;
|
|
698
|
+
if (checkState === 'passed') {
|
|
699
|
+
const result = await github.mergePr(sourceBranch);
|
|
700
|
+
if (!result.success) {
|
|
701
|
+
throw new Error(`Failed to merge PR: ${result.error}`);
|
|
702
|
+
}
|
|
703
|
+
outcome = 'merged';
|
|
704
|
+
}
|
|
705
|
+
else if (checkState === 'pending') {
|
|
706
|
+
outcome = await enableAutoMergeOrPoll(sourceBranch, RELEASE_KIND);
|
|
707
|
+
}
|
|
708
|
+
else {
|
|
709
|
+
// Failed checks reach the gate's admin-override path; checks not reported yet are waited for
|
|
710
|
+
// there, and a repository with no CI/CD at all merges straight through it.
|
|
711
|
+
await mergeWithCheckGate(sourceBranch, RELEASE_KIND);
|
|
712
|
+
outcome = 'merged';
|
|
713
|
+
}
|
|
714
|
+
logger.newline();
|
|
715
|
+
await reportMergeOutcome(outcome, RELEASE_KIND, targetBranch, pr.url, true);
|
|
716
|
+
}
|
|
717
|
+
//# sourceMappingURL=release-engine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release-engine.js","sourceRoot":"","sources":["../../../src/workflow/engine/release-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,IAA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,EAAE,IAAI,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { CommandOption } from '../../types/index.js';
|
|
2
|
+
import { type WorkflowTransition } from './workflow-engine.js';
|
|
3
|
+
/**
|
|
4
|
+
* Shipping work that exists before its project item's branch does. Uncommitted changes in a
|
|
5
|
+
* checkout of the branch an item's branch is cut from (the base branch, `working/release` by
|
|
6
|
+
* default) are carried onto the item's branch: committed and pushed there, never on the base
|
|
7
|
+
* branch, and checked out per the isolation mode. The item can then be advanced through every
|
|
8
|
+
* workflow state up to Approved and Merged with nothing asked on the way: no Claude session is
|
|
9
|
+
* started, the PR is opened and assigned to the person running the command (who, by merging it, is
|
|
10
|
+
* the approver of record), and it merges once the required checks pass - the same gate as every
|
|
11
|
+
* other stage-1 merge.
|
|
12
|
+
*
|
|
13
|
+
* Changes are carried only onto a branch with no work of its own: one created for them, or a live
|
|
14
|
+
* branch that still matches the branch it is cut from.
|
|
15
|
+
*/
|
|
16
|
+
export declare const carryLocalChangesOption: CommandOption;
|
|
17
|
+
export declare const approveAndMergeOption: CommandOption;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the resolved options carry local changes. Reads a flag, so options that depend on it are
|
|
20
|
+
* declared after `carryLocalChangesOption`.
|
|
21
|
+
*/
|
|
22
|
+
export declare function carriesLocalChanges(resolved: Record<string, string>): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Whether the resolved options approve and merge the item's PR.
|
|
25
|
+
*/
|
|
26
|
+
export declare function approvesAndMerges(resolved: Record<string, string>): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The branch creation options alongside carrying: carried changes go onto an independent branch,
|
|
29
|
+
* so the workflow type is asked only when nothing is carried.
|
|
30
|
+
*/
|
|
31
|
+
export declare const branchCreationOptionsWithCarrying: CommandOption[];
|
|
32
|
+
export declare const commitMessageOption: CommandOption;
|
|
33
|
+
/**
|
|
34
|
+
* Reviewers requested on the PR when the item is approved and merged. Never asked: the PR's
|
|
35
|
+
* assignee approves it.
|
|
36
|
+
*/
|
|
37
|
+
export declare const unpromptedReviewersOption: CommandOption;
|
|
38
|
+
/**
|
|
39
|
+
* The options that apply once changes are carried or the item is approved and merged. Declared
|
|
40
|
+
* after the two flags, which they depend on.
|
|
41
|
+
*/
|
|
42
|
+
export declare const shipOptions: CommandOption[];
|
|
43
|
+
/**
|
|
44
|
+
* Uncommitted changes in the checkout of the branch an item's branch is cut from.
|
|
45
|
+
*/
|
|
46
|
+
export interface LocalChanges {
|
|
47
|
+
/** The branch checked out where the changes are; the item's branch is cut from it. */
|
|
48
|
+
sourceBranch: string;
|
|
49
|
+
/** The checkout holding the changes. */
|
|
50
|
+
checkoutPath: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The uncommitted changes of the current checkout, to carry onto an item's branch; null when there
|
|
54
|
+
* are none. Read before anything is created, so a checkout the changes cannot be carried from stops
|
|
55
|
+
* the command before an item or branch exists. `expectedSourceBranch` is the branch a new item's
|
|
56
|
+
* branch will be cut from, or null when an existing item decides that, which carrying checks.
|
|
57
|
+
*
|
|
58
|
+
* The checkout's own branch must have no commits that origin lacks: carrying takes uncommitted
|
|
59
|
+
* changes only, and such commits would either travel with them or be left behind on the base branch.
|
|
60
|
+
*/
|
|
61
|
+
export declare function findLocalChanges(expectedSourceBranch: string | null): Promise<LocalChanges | null>;
|
|
62
|
+
/**
|
|
63
|
+
* Carry uncommitted changes onto the item's branch. The changes are committed on top of the
|
|
64
|
+
* checkout's commit without touching the checkout, and the commit becomes the tip of the item's
|
|
65
|
+
* branch on origin: a new branch, recorded on the platform as the item's, for an item with no live
|
|
66
|
+
* branch, or the item's live branch while it has no commits of its own. The base branch is left as
|
|
67
|
+
* origin has it.
|
|
68
|
+
*
|
|
69
|
+
* The branch then gets its local checkout per the isolation mode. In the main repository, the
|
|
70
|
+
* checkout that held the changes switches to the branch with its working tree as it is, which is
|
|
71
|
+
* the branch's tip. Otherwise the branch gets a worktree, and the checkout that held the changes is
|
|
72
|
+
* cleaned of them, unless they changed meanwhile.
|
|
73
|
+
*
|
|
74
|
+
* Reads `commit-message`, `title`, `branch-name`, `base-branch` and `isolation` from the
|
|
75
|
+
* transition's options.
|
|
76
|
+
*/
|
|
77
|
+
export declare function carryLocalChanges(transition: WorkflowTransition, changes: LocalChanges): Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* Advance the item through every workflow state up to Approved and Merged, asking nothing: the
|
|
80
|
+
* states on the way get the options a person would otherwise be asked for. No Claude session is
|
|
81
|
+
* started on the way through Agent Implementation, the PR is assigned to the person running the
|
|
82
|
+
* command, who merges it once the required checks pass, and the base branch's local checkout is
|
|
83
|
+
* brought up to date with the merge. Each state runs its usual automation, so a run that stops -
|
|
84
|
+
* on failing checks, say - continues from where it stopped when run again.
|
|
85
|
+
*/
|
|
86
|
+
export declare function approveAndMerge(transition: WorkflowTransition): Promise<void>;
|
|
87
|
+
//# sourceMappingURL=ship-flow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ship-flow.d.ts","sourceRoot":"","sources":["../../../src/workflow/engine/ship-flow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAY1D,OAAO,EAKL,KAAK,kBAAkB,EACxB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,uBAAuB,EAAE,aAKrC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,aAInC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAE7E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAE3E;AAED;;;GAGG;AACH,eAAO,MAAM,iCAAiC,EAAE,aAAa,EAI5D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