@fairgarden/distribution 0.1.0-alpha.1 → 0.1.0-alpha.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 +3 -3
- package/dist/add-module.d.ts +4 -0
- package/dist/add-module.d.ts.map +1 -1
- package/dist/add-module.js +29 -0
- package/dist/add-module.js.map +1 -1
- package/dist/calver.d.ts +65 -0
- package/dist/calver.d.ts.map +1 -0
- package/dist/calver.js +115 -0
- package/dist/calver.js.map +1 -0
- package/dist/canary.d.ts.map +1 -1
- package/dist/canary.js +15 -2
- package/dist/canary.js.map +1 -1
- package/dist/changelog.d.ts +153 -0
- package/dist/changelog.d.ts.map +1 -0
- package/dist/changelog.js +359 -0
- package/dist/changelog.js.map +1 -0
- package/dist/cli.js +356 -12
- package/dist/cli.js.map +1 -1
- package/dist/extends.d.ts +3 -2
- package/dist/extends.d.ts.map +1 -1
- package/dist/extends.js +12 -2
- package/dist/extends.js.map +1 -1
- package/dist/forks.d.ts +116 -0
- package/dist/forks.d.ts.map +1 -0
- package/dist/forks.js +357 -0
- package/dist/forks.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/inherit.d.ts +18 -0
- package/dist/inherit.d.ts.map +1 -0
- package/dist/inherit.js +84 -0
- package/dist/inherit.js.map +1 -0
- package/dist/manifest.d.ts +43 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +64 -0
- package/dist/manifest.js.map +1 -0
- package/dist/policy.d.ts +5 -1
- package/dist/policy.d.ts.map +1 -1
- package/dist/policy.js +14 -6
- package/dist/policy.js.map +1 -1
- package/dist/readme.d.ts +2 -0
- package/dist/readme.d.ts.map +1 -1
- package/dist/readme.js +6 -1
- package/dist/readme.js.map +1 -1
- package/dist/release.d.ts +37 -1
- package/dist/release.d.ts.map +1 -1
- package/dist/release.js +107 -7
- package/dist/release.js.map +1 -1
- package/dist/scaffold.d.ts +3 -5
- package/dist/scaffold.d.ts.map +1 -1
- package/dist/scaffold.js +116 -64
- package/dist/scaffold.js.map +1 -1
- package/dist/submodules.d.ts +49 -0
- package/dist/submodules.d.ts.map +1 -1
- package/dist/submodules.js +94 -4
- package/dist/submodules.js.map +1 -1
- package/dist/workflows.d.ts +46 -1
- package/dist/workflows.d.ts.map +1 -1
- package/dist/workflows.js +401 -20
- package/dist/workflows.js.map +1 -1
- package/package.json +14 -12
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
import { execFileSync } from 'node:child_process';
|
|
2
|
+
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
3
|
+
import { readFile, writeFile } from 'node:fs/promises';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import semver from 'semver';
|
|
6
|
+
import { isDistribution } from "./submodules.js";
|
|
7
|
+
/**
|
|
8
|
+
* Changelogs.
|
|
9
|
+
*
|
|
10
|
+
* Every module keeps a CHANGELOG.md. Its top section is the version its main
|
|
11
|
+
* carries — the next to be released — and every pull request adds a line to
|
|
12
|
+
* it that links the pull request, which CI checks before it can merge. When
|
|
13
|
+
* the version is published its notes are written already, and committed: the
|
|
14
|
+
* release takes them as they are, and `release` opens the next section.
|
|
15
|
+
*
|
|
16
|
+
* A distribution's changelog is mostly written for it. fg-dist notes each
|
|
17
|
+
* module it bumps, with a link to that release's notes, and each module it
|
|
18
|
+
* adds, forks, or takes back to upstream. What people change in it by hand —
|
|
19
|
+
* the organization's policy — is checked like a module's.
|
|
20
|
+
*/
|
|
21
|
+
export const CHANGELOG = 'CHANGELOG.md';
|
|
22
|
+
/** Where a pull request that needs no entry — a lockfile bump — says so. */
|
|
23
|
+
export const SKIP_LABEL = 'skip changelog';
|
|
24
|
+
/**
|
|
25
|
+
* A new changelog, opened at `version`.
|
|
26
|
+
*
|
|
27
|
+
* Nothing but the heading: a changelog is for whoever uses a release, and how
|
|
28
|
+
* lines get into it is for contributors, who hear it from the check that asks
|
|
29
|
+
* for one.
|
|
30
|
+
*/
|
|
31
|
+
export const newChangelog = (version) => `# Changelog\n\n## ${version}\n`;
|
|
32
|
+
const HEADING = /^## +(\S+)/;
|
|
33
|
+
/** The same version, however it is spelled: `26.09.01` is npm's `26.9.1`. */
|
|
34
|
+
const sameVersion = (a, b) => {
|
|
35
|
+
if (a === b)
|
|
36
|
+
return true;
|
|
37
|
+
const left = semver.clean(a, { loose: true });
|
|
38
|
+
return left !== null && left === semver.clean(b, { loose: true });
|
|
39
|
+
};
|
|
40
|
+
const sectionsOf = (lines) => {
|
|
41
|
+
const sections = [];
|
|
42
|
+
lines.forEach((line, index) => {
|
|
43
|
+
const match = HEADING.exec(line);
|
|
44
|
+
if (!match)
|
|
45
|
+
return;
|
|
46
|
+
const previous = sections.at(-1);
|
|
47
|
+
if (previous)
|
|
48
|
+
previous.end = index;
|
|
49
|
+
sections.push({ version: match[1], start: index, end: lines.length });
|
|
50
|
+
});
|
|
51
|
+
return sections;
|
|
52
|
+
};
|
|
53
|
+
/** The version of the top section, which is the one being worked on. */
|
|
54
|
+
export const topVersion = (text) => sectionsOf(text.split('\n'))[0]?.version;
|
|
55
|
+
/** What `version`'s section says, without its heading; undefined when there is none, or nothing in it. */
|
|
56
|
+
export const notesFor = (text, version) => {
|
|
57
|
+
const lines = text.split('\n');
|
|
58
|
+
const section = sectionsOf(lines).find((candidate) => sameVersion(candidate.version, version));
|
|
59
|
+
if (!section)
|
|
60
|
+
return undefined;
|
|
61
|
+
const body = lines.slice(section.start + 1, section.end).join('\n').trim();
|
|
62
|
+
return body === '' ? undefined : `${body}\n`;
|
|
63
|
+
};
|
|
64
|
+
/** `text` with `version` as its top section, added above the others unless it is there. */
|
|
65
|
+
export const withSection = (text, version) => {
|
|
66
|
+
const lines = text.split('\n');
|
|
67
|
+
const sections = sectionsOf(lines);
|
|
68
|
+
if (sections[0] && sameVersion(sections[0].version, version))
|
|
69
|
+
return text;
|
|
70
|
+
const at = sections[0]?.start ?? lines.length;
|
|
71
|
+
const before = lines.slice(0, at);
|
|
72
|
+
while (before.length > 0 && before.at(-1) === '')
|
|
73
|
+
before.pop();
|
|
74
|
+
return [...before, '', `## ${version}`, '', ...lines.slice(at)].join('\n').replace(/\n*$/, '\n');
|
|
75
|
+
};
|
|
76
|
+
/** `text` with its top section, `from`, called `to` instead: a release moved before it was published. */
|
|
77
|
+
export const renameTop = (text, from, to) => {
|
|
78
|
+
const lines = text.split('\n');
|
|
79
|
+
const top = sectionsOf(lines)[0];
|
|
80
|
+
if (!top || !sameVersion(top.version, from))
|
|
81
|
+
return withSection(text, to);
|
|
82
|
+
lines[top.start] = lines[top.start].replace(top.version, to);
|
|
83
|
+
return lines.join('\n');
|
|
84
|
+
};
|
|
85
|
+
/** `text` with `entry` as a line at the end of `version`'s section, the top one. */
|
|
86
|
+
export const withEntry = (text, version, entry) => {
|
|
87
|
+
const lines = withSection(text, version).split('\n');
|
|
88
|
+
const top = sectionsOf(lines)[0];
|
|
89
|
+
// Said once: running the same command twice writes nothing new.
|
|
90
|
+
if (lines.slice(top.start + 1, top.end).includes(`- ${entry}`))
|
|
91
|
+
return lines.join('\n');
|
|
92
|
+
let at = top.end;
|
|
93
|
+
while (at > top.start + 1 && lines[at - 1] === '')
|
|
94
|
+
at -= 1;
|
|
95
|
+
const line = `- ${entry}`;
|
|
96
|
+
// A blank line after the heading, and one before the next section.
|
|
97
|
+
const insert = at === top.start + 1 ? ['', line] : [line];
|
|
98
|
+
const rest = lines.slice(at);
|
|
99
|
+
return [...lines.slice(0, at), ...insert, ...(rest.length > 0 && rest[0] !== '' ? [''] : []), ...rest]
|
|
100
|
+
.join('\n')
|
|
101
|
+
.replace(/\n*$/, '\n');
|
|
102
|
+
};
|
|
103
|
+
const readVersion = (root) => {
|
|
104
|
+
try {
|
|
105
|
+
const version = JSON.parse(readFileSync(path.join(root, 'package.json'), 'utf8')).version;
|
|
106
|
+
return typeof version === 'string' ? version : undefined;
|
|
107
|
+
}
|
|
108
|
+
catch {
|
|
109
|
+
return undefined;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Open the section for the version a repository now carries, when it keeps a
|
|
114
|
+
* changelog: what `release` does as it moves main on.
|
|
115
|
+
*/
|
|
116
|
+
export const openSection = async (root, version = readVersion(root)) => {
|
|
117
|
+
const file = path.join(root, CHANGELOG);
|
|
118
|
+
if (!version || !existsSync(file))
|
|
119
|
+
return false;
|
|
120
|
+
const text = await readFile(file, 'utf8');
|
|
121
|
+
const updated = withSection(text, version);
|
|
122
|
+
if (updated === text)
|
|
123
|
+
return false;
|
|
124
|
+
await writeFile(file, updated);
|
|
125
|
+
return true;
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* Add a line to a repository's changelog, under the version it carries,
|
|
129
|
+
* starting the changelog when there is none: what fg-dist writes into a
|
|
130
|
+
* distribution's as it changes what the distribution ships.
|
|
131
|
+
*/
|
|
132
|
+
export const addEntry = (root, entry) => {
|
|
133
|
+
const version = readVersion(root);
|
|
134
|
+
if (!version)
|
|
135
|
+
return;
|
|
136
|
+
const file = path.join(root, CHANGELOG);
|
|
137
|
+
const text = existsSync(file) ? readFileSync(file, 'utf8') : newChangelog(version);
|
|
138
|
+
writeFileSync(file, withEntry(text, version, entry));
|
|
139
|
+
};
|
|
140
|
+
/** Note a change to what a distribution ships in its changelog; anywhere else, nothing. */
|
|
141
|
+
export const noteInDistribution = (root, entry) => {
|
|
142
|
+
if (isDistribution(root))
|
|
143
|
+
addEntry(root, entry);
|
|
144
|
+
};
|
|
145
|
+
/** A module's name and version, as its checkout states them, for a changelog line. */
|
|
146
|
+
export const moduleLabel = (checkout) => {
|
|
147
|
+
try {
|
|
148
|
+
const pkg = JSON.parse(readFileSync(path.join(checkout, 'package.json'), 'utf8'));
|
|
149
|
+
return {
|
|
150
|
+
name: typeof pkg.name === 'string' ? pkg.name : path.basename(checkout),
|
|
151
|
+
version: typeof pkg.version === 'string' ? pkg.version : undefined,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
catch {
|
|
155
|
+
return { name: path.basename(checkout), version: undefined };
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
/** The top section called `to` rather than `from`, or a new one when `from` was published. */
|
|
159
|
+
export const moveSection = async (root, from, to, { published }) => {
|
|
160
|
+
const file = path.join(root, CHANGELOG);
|
|
161
|
+
if (!existsSync(file) || from === to)
|
|
162
|
+
return;
|
|
163
|
+
const text = await readFile(file, 'utf8');
|
|
164
|
+
await writeFile(file, published ? withSection(text, to) : renameTop(text, from, to));
|
|
165
|
+
};
|
|
166
|
+
const git = (cwd, args) => execFileSync('git', args, { cwd, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] });
|
|
167
|
+
const attempt = (cwd, args) => {
|
|
168
|
+
try {
|
|
169
|
+
return git(cwd, args);
|
|
170
|
+
}
|
|
171
|
+
catch {
|
|
172
|
+
return undefined;
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* Whether a pull request has added its changelog entry.
|
|
177
|
+
*
|
|
178
|
+
* It needs a line under the top section, linking it. In a module that is
|
|
179
|
+
* every pull request; in a distribution only one that changes the
|
|
180
|
+
* organization's policy — what else changes there, fg-dist notes itself.
|
|
181
|
+
*/
|
|
182
|
+
export const checkChangelog = (root, check) => {
|
|
183
|
+
const { pullRequest, repository, base, distribution, labels = [] } = check;
|
|
184
|
+
const server = (check.server ?? 'https://github.com').replace(/\/+$/, '');
|
|
185
|
+
const url = `${server}/${repository}/pull/${pullRequest}`;
|
|
186
|
+
// Nothing merges between a release and the start of the next cycle: its
|
|
187
|
+
// lines would go under a version already out. The release moves main on
|
|
188
|
+
// straight after publishing, and this runs again once the branch has that.
|
|
189
|
+
const carried = readVersion(root);
|
|
190
|
+
if (carried && attempt(root, ['rev-parse', '--verify', '--quiet', `refs/tags/v${carried}`]) !== undefined) {
|
|
191
|
+
return {
|
|
192
|
+
ok: false,
|
|
193
|
+
required: true,
|
|
194
|
+
message: `This branch is at ${carried}, which is released. Bring it up to date with its base — ` +
|
|
195
|
+
'the release starts the next version there — and this runs again.',
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
// Starting the next version is what opens its section; nothing in it is news.
|
|
199
|
+
const opened = topVersion(attempt(root, ['show', `${base}:${CHANGELOG}`]) ?? '');
|
|
200
|
+
const current = topVersion(existsSync(path.join(root, CHANGELOG)) ? readFileSync(path.join(root, CHANGELOG), 'utf8') : '');
|
|
201
|
+
if (current && opened && current !== opened) {
|
|
202
|
+
return { ok: true, required: false, message: `This starts ${current}, so it needs no line of its own.` };
|
|
203
|
+
}
|
|
204
|
+
if (labels.includes(SKIP_LABEL)) {
|
|
205
|
+
return { ok: true, required: false, message: `Labelled "${SKIP_LABEL}", so no entry is needed.` };
|
|
206
|
+
}
|
|
207
|
+
const changed = git(root, ['diff', '--name-only', `${base}...HEAD`]).split('\n').filter(Boolean);
|
|
208
|
+
if (distribution) {
|
|
209
|
+
const policy = changed.filter((file) => file.startsWith('policies/') && !file.startsWith('policies/dist/'));
|
|
210
|
+
if (policy.length === 0) {
|
|
211
|
+
return {
|
|
212
|
+
ok: true,
|
|
213
|
+
required: false,
|
|
214
|
+
message: "This changes none of the organization's policy, so fg-dist keeps the changelog itself.",
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
const file = path.join(root, CHANGELOG);
|
|
219
|
+
const text = existsSync(file) ? readFileSync(file, 'utf8') : '';
|
|
220
|
+
const version = topVersion(text) ?? readVersion(root) ?? 'the top section';
|
|
221
|
+
const example = `- What this changes, for someone using it ([#${pullRequest}](${url}))`;
|
|
222
|
+
const wanted = `Add a line to ${CHANGELOG}, under ${version}, that links this pull request:\n\n${example}\n\n` +
|
|
223
|
+
`Or label the pull request "${SKIP_LABEL}" if it changes nothing anyone would read about.`;
|
|
224
|
+
const link = url.replace(/^https?:\/\//, '').toLowerCase();
|
|
225
|
+
const added = git(root, ['diff', `${base}...HEAD`, '--', CHANGELOG])
|
|
226
|
+
.split('\n')
|
|
227
|
+
.filter((line) => line.startsWith('+') && !line.startsWith('+++'))
|
|
228
|
+
.map((line) => line.slice(1))
|
|
229
|
+
.filter((line) => line.toLowerCase().includes(link));
|
|
230
|
+
if (added.length === 0) {
|
|
231
|
+
return { ok: false, required: true, message: `${CHANGELOG} has no line linking this pull request.\n${wanted}` };
|
|
232
|
+
}
|
|
233
|
+
// Under the version being worked on, not one already released.
|
|
234
|
+
const lines = text.split('\n');
|
|
235
|
+
const top = sectionsOf(lines)[0];
|
|
236
|
+
const inTop = top !== undefined &&
|
|
237
|
+
lines.slice(top.start + 1, top.end).some((line) => line.toLowerCase().includes(link));
|
|
238
|
+
if (!inTop) {
|
|
239
|
+
return {
|
|
240
|
+
ok: false,
|
|
241
|
+
required: true,
|
|
242
|
+
message: `${CHANGELOG} links this pull request, but not under ${version}, which is what it ships in.\n${wanted}`,
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
return { ok: true, required: true, message: `${CHANGELOG} has this pull request under ${version}.` };
|
|
246
|
+
};
|
|
247
|
+
/** What a GitHub Actions `pull_request` run says about itself. */
|
|
248
|
+
export const pullRequestFromActions = () => {
|
|
249
|
+
const file = process.env.GITHUB_EVENT_PATH;
|
|
250
|
+
if (!file || !existsSync(file))
|
|
251
|
+
return {};
|
|
252
|
+
try {
|
|
253
|
+
const event = JSON.parse(readFileSync(file, 'utf8'));
|
|
254
|
+
const pr = event.pull_request;
|
|
255
|
+
if (!pr)
|
|
256
|
+
return {};
|
|
257
|
+
return {
|
|
258
|
+
pullRequest: pr.number,
|
|
259
|
+
base: pr.base?.sha,
|
|
260
|
+
labels: Array.isArray(pr.labels) ? pr.labels.map((label) => label.name ?? '') : [],
|
|
261
|
+
repository: process.env.GITHUB_REPOSITORY,
|
|
262
|
+
server: process.env.GITHUB_SERVER_URL,
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
catch {
|
|
266
|
+
return {};
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
/** Where a repository's release of `tag` is described, when it is on GitHub. */
|
|
270
|
+
export const releaseNotesUrl = (repository, tag) => {
|
|
271
|
+
const match = /github\.com[/:]([^/]+\/[^/]+?)(?:\.git)?\/?$/i.exec(repository);
|
|
272
|
+
return match ? `https://github.com/${match[1]}/releases/tag/${tag}` : undefined;
|
|
273
|
+
};
|
|
274
|
+
/** A repository as a markdown link to it, or its url when it has no web page. */
|
|
275
|
+
export const repositoryLink = (repository) => {
|
|
276
|
+
const match = /github\.com[/:]([^/]+\/[^/]+?)(?:\.git)?\/?$/i.exec(repository);
|
|
277
|
+
return match ? `[${match[1]}](https://github.com/${match[1]})` : repository;
|
|
278
|
+
};
|
|
279
|
+
/** `v1.2.0` as `1.2.0`, for reading; anything else as it is. */
|
|
280
|
+
export const shown = (version) => version.replace(/^v(?=\d)/, '');
|
|
281
|
+
/**
|
|
282
|
+
* The releases a module moving to `to` takes in, oldest first: every one past
|
|
283
|
+
* where it was, up to and including `to`, prereleases too. Each release's
|
|
284
|
+
* notes are its own, so skipping one would hide what it changed.
|
|
285
|
+
*/
|
|
286
|
+
export const crossedReleases = (newer, to) => {
|
|
287
|
+
const crossed = newer
|
|
288
|
+
.filter((tag) => semver.valid(tag) !== null && semver.lte(tag, to))
|
|
289
|
+
.sort((a, b) => semver.compare(a, b));
|
|
290
|
+
return crossed.length > 0 ? crossed : [to];
|
|
291
|
+
};
|
|
292
|
+
/** Links to the notes of each release, for a changelog line: one, or each in turn. */
|
|
293
|
+
export const releaseNotesLinks = (repository, releases) => {
|
|
294
|
+
const links = releases.flatMap((tag) => {
|
|
295
|
+
const url = releaseNotesUrl(repository, tag);
|
|
296
|
+
return url ? [{ version: shown(tag), url }] : [];
|
|
297
|
+
});
|
|
298
|
+
if (links.length === 0)
|
|
299
|
+
return '';
|
|
300
|
+
if (links.length === 1)
|
|
301
|
+
return ` ([release notes](${links[0].url}))`;
|
|
302
|
+
return ` (release notes: ${links.map((link) => `[${link.version}](${link.url})`).join(', ')})`;
|
|
303
|
+
};
|
|
304
|
+
/** A module moved from one release to another, linking the notes of each it takes in. */
|
|
305
|
+
export const bumpEntry = (name, from, to, repository, releases, how) => `\`${name}\` ${shown(from)} → ${shown(to)}${how ? `, ${how}` : ''}${releaseNotesLinks(repository, releases)}`;
|
|
306
|
+
/**
|
|
307
|
+
* A module shipped ahead of its next release: what the change is, and where it
|
|
308
|
+
* can be read about — its pull request, or its commit.
|
|
309
|
+
*/
|
|
310
|
+
export const aheadEntry = (name, change, link) => `\`${name}\` ahead of its next release: ${change}${link ? ` ([${link.text}](${link.url}))` : ''}`;
|
|
311
|
+
/**
|
|
312
|
+
* Which check to run again for each open pull request: the latest on its
|
|
313
|
+
* head commit. One with none yet needs nothing — its first run sees the
|
|
314
|
+
* release.
|
|
315
|
+
*/
|
|
316
|
+
export const holdsFor = (pullRequests, runs) => pullRequests.map((pullRequest) => {
|
|
317
|
+
const run = runs.find((candidate) => candidate.event === 'pull_request' && candidate.headSha === pullRequest.headRefOid);
|
|
318
|
+
return { pullRequest: pullRequest.number, run: run?.databaseId, running: run !== undefined && run.status !== 'completed' };
|
|
319
|
+
});
|
|
320
|
+
const gh = (cwd, args) => execFileSync('gh', args, { cwd, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] });
|
|
321
|
+
/**
|
|
322
|
+
* Hold open pull requests until the next version starts, straight after a
|
|
323
|
+
* release: each one's changelog check runs again, finds the version its branch
|
|
324
|
+
* is at released, and refuses it. Merging the pull request that starts the next
|
|
325
|
+
* version lets them through again, once each has caught up with it.
|
|
326
|
+
*
|
|
327
|
+
* Needs `gh`, and a token that may re-run workflows (`actions: write`).
|
|
328
|
+
*/
|
|
329
|
+
export const holdPullRequests = (root, { base, workflow = 'changelog.yml' }) => {
|
|
330
|
+
const pullRequests = JSON.parse(gh(root, ['pr', 'list', '--base', base, '--state', 'open', '--limit', '200', '--json', 'number,headRefOid']));
|
|
331
|
+
if (pullRequests.length === 0)
|
|
332
|
+
return [];
|
|
333
|
+
const runs = JSON.parse(gh(root, [
|
|
334
|
+
'run', 'list', '--workflow', workflow, '--event', 'pull_request', '--limit', '500',
|
|
335
|
+
'--json', 'databaseId,headSha,event,status',
|
|
336
|
+
]));
|
|
337
|
+
return holdsFor(pullRequests, runs).map((hold) => {
|
|
338
|
+
if (hold.run === undefined)
|
|
339
|
+
return { ...hold, held: true };
|
|
340
|
+
try {
|
|
341
|
+
// A run still going cannot be run again until it is done.
|
|
342
|
+
if (hold.running) {
|
|
343
|
+
try {
|
|
344
|
+
gh(root, ['run', 'watch', String(hold.run), '--interval', '10']);
|
|
345
|
+
}
|
|
346
|
+
catch {
|
|
347
|
+
// It failing is fine; it only has to have finished.
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
gh(root, ['run', 'rerun', String(hold.run)]);
|
|
351
|
+
return { ...hold, held: true };
|
|
352
|
+
}
|
|
353
|
+
catch (error) {
|
|
354
|
+
const stderr = error instanceof Error && 'stderr' in error ? String(error.stderr).trim() : String(error);
|
|
355
|
+
return { ...hold, held: false, problem: stderr };
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
};
|
|
359
|
+
//# sourceMappingURL=changelog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changelog.js","sourceRoot":"","sources":["../src/changelog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,MAAM,MAAM,QAAQ,CAAA;AAC3B,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhD;;;;;;;;;;;;;GAaG;AAEH,MAAM,CAAC,MAAM,SAAS,GAAG,cAAc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