code-foundry 1.44.8 → 1.44.10
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/.github/workflows/release.yml +55 -29
- package/CHANGELOG.md +15 -20
- package/package.json +1 -1
|
@@ -262,7 +262,8 @@ jobs:
|
|
|
262
262
|
const { execFileSync } = require('node:child_process');
|
|
263
263
|
const fs = require('node:fs');
|
|
264
264
|
|
|
265
|
-
const gh = (args) =>
|
|
265
|
+
const gh = (args) =>
|
|
266
|
+
execFileSync('gh', args, { encoding: 'utf8', maxBuffer: 32 * 1024 * 1024 });
|
|
266
267
|
|
|
267
268
|
const repo = process.env.REPOSITORY;
|
|
268
269
|
const config = JSON.parse(fs.readFileSync(process.env.CONFIG_FILE, 'utf8'));
|
|
@@ -275,53 +276,78 @@ jobs:
|
|
|
275
276
|
'api', `repos/${repo}/pulls`,
|
|
276
277
|
'-X', 'GET',
|
|
277
278
|
'-f', 'state=closed',
|
|
278
|
-
'-f', `head=${repo.split('/')[0]}:release-please--branches--main`,
|
|
279
279
|
'-f', 'sort=updated',
|
|
280
280
|
'-f', 'direction=desc',
|
|
281
281
|
'-f', 'per_page=100',
|
|
282
|
-
])).filter((pull) => pull.merged_at !== null);
|
|
282
|
+
])).filter((pull) => pull.merged_at !== null && pull.head.ref === 'release-please--branches--main');
|
|
283
283
|
|
|
284
284
|
// The newest existing tag supplies the tag prefix; the manifest
|
|
285
285
|
// supplies the version each merged pull request published.
|
|
286
286
|
const tags = JSON.parse(gh([
|
|
287
287
|
'api', `repos/${repo}/tags`, '-X', 'GET', '-f', 'per_page=100',
|
|
288
|
-
]));
|
|
289
|
-
|
|
288
|
+
])).map((tag) => tag.name);
|
|
289
|
+
// Only version-shaped tags inform the prefix; stray tags must
|
|
290
|
+
// not corrupt it.
|
|
291
|
+
const versionedTags = tags.filter((name) => /v?\d+\.\d+\.\d+$/.test(name));
|
|
292
|
+
const latestTag = versionedTags[0] ?? '';
|
|
290
293
|
const prefix = latestTag.replace(/v?\d+\.\d+\.\d+.*$/, '') || 'v';
|
|
291
294
|
|
|
292
|
-
let
|
|
295
|
+
let ensured = 0;
|
|
296
|
+
let failures = 0;
|
|
293
297
|
let lastTag = '';
|
|
294
298
|
let lastSha = '';
|
|
295
299
|
for (const pull of pulls) {
|
|
296
|
-
const version = /^chore\(main\): release (
|
|
300
|
+
const version = /^chore\(main\): release (\S+)/.exec(pull.title)?.[1];
|
|
297
301
|
if (!version) continue;
|
|
298
302
|
const tag = `${prefix}v${version}`;
|
|
299
|
-
|
|
300
|
-
|
|
303
|
+
// Draft releases are invisible to get-release-by-tag, so scan
|
|
304
|
+
// the list endpoint (which returns drafts) for the tag.
|
|
305
|
+
const releasesForCheck = JSON.parse(gh([
|
|
306
|
+
'api', `repos/${repo}/releases`, '-X', 'GET', '-f', 'per_page=100',
|
|
307
|
+
]));
|
|
308
|
+
if (releasesForCheck.some((release) => release.tag_name === tag)) {
|
|
301
309
|
console.log(`${tag}: release object already exists`);
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
//
|
|
310
|
+
} else {
|
|
311
|
+
// No release object for this tag: create it. The tag may also
|
|
312
|
+
// already exist from a partial earlier attempt; the release
|
|
313
|
+
// creation adopts an existing tag, so ref-creation errors are
|
|
314
|
+
// not fatal.
|
|
315
|
+
if (!tags.includes(tag)) {
|
|
316
|
+
try {
|
|
317
|
+
gh(['api', `repos/${repo}/git/refs`, '-X', 'POST',
|
|
318
|
+
'-f', `ref=refs/tags/${tag}`, '-f', `sha=${pull.merge_commit_sha}`]);
|
|
319
|
+
console.log(`${tag}: tag created at ${pull.merge_commit_sha.slice(0, 10)}`);
|
|
320
|
+
} catch (error) {
|
|
321
|
+
console.log(`${tag}: tag ref creation skipped: ${String(error.message).slice(0, 120)}`);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
try {
|
|
325
|
+
const body = JSON.stringify({
|
|
326
|
+
tag_name: tag,
|
|
327
|
+
name: tag,
|
|
328
|
+
body: pull.body ?? '',
|
|
329
|
+
draft: config.packages?.['.']?.draft ?? config.draft ?? false,
|
|
330
|
+
prerelease: version.includes('-'),
|
|
331
|
+
});
|
|
332
|
+
gh(['api', `repos/${repo}/releases`, '-X', 'POST', '--input', '-'], { input: body });
|
|
333
|
+
console.log(`${tag}: release object created`);
|
|
334
|
+
} catch (error) {
|
|
335
|
+
failures += 1;
|
|
336
|
+
console.log(`${tag}: release creation failed: ${String(error.message).slice(0, 160)}`);
|
|
337
|
+
continue;
|
|
338
|
+
}
|
|
305
339
|
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
340
|
+
// The newest ensured release drives the batched promotion step.
|
|
341
|
+
if (!lastTag) {
|
|
342
|
+
lastTag = tag;
|
|
343
|
+
lastSha = pull.merge_commit_sha;
|
|
310
344
|
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
draft: config.packages?.['.']?.draft ?? config.draft ?? false,
|
|
316
|
-
prerelease: version.includes('-'),
|
|
317
|
-
});
|
|
318
|
-
gh(['api', `repos/${repo}/releases`, '-X', 'POST', '--input', '-'], { input: body });
|
|
319
|
-
console.log(`${tag}: release object created`);
|
|
320
|
-
created += 1;
|
|
321
|
-
lastTag = tag;
|
|
322
|
-
lastSha = pull.merge_commit_sha;
|
|
345
|
+
ensured += 1;
|
|
346
|
+
}
|
|
347
|
+
if (failures > 0) {
|
|
348
|
+
throw new Error(`${failures} release object(s) could not be ensured; see the log above`);
|
|
323
349
|
}
|
|
324
|
-
if (
|
|
350
|
+
if (ensured === 0) {
|
|
325
351
|
throw new Error(
|
|
326
352
|
'release-please failed and no merged version pull request was waiting for a release object; ' +
|
|
327
353
|
'the failure needs human eyes'
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.44.10](https://github.com/0xPlayerOne/code-foundry/compare/v1.44.9...v1.44.10) (2026-10-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **release:** treat ref-creation errors in the REST fallback as non-fatal ([#727](https://github.com/0xPlayerOne/code-foundry/issues/727)) ([75ea614](https://github.com/0xPlayerOne/code-foundry/commit/75ea61465e7c4cacd39e3aa8c52df93c2ea9bf03))
|
|
9
|
+
|
|
10
|
+
## [1.44.9](https://github.com/0xPlayerOne/code-foundry/compare/v1.44.8...v1.44.9) (2026-10-06)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **release:** make the REST fallback draft-aware and idempotent ([#725](https://github.com/0xPlayerOne/code-foundry/issues/725)) ([c29da6e](https://github.com/0xPlayerOne/code-foundry/commit/c29da6efb919d68a568c2328eea2c2f7654334fe))
|
|
16
|
+
|
|
3
17
|
## [1.44.8](https://github.com/0xPlayerOne/code-foundry/compare/v1.44.7...v1.44.8) (2026-10-06)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -131,28 +145,9 @@
|
|
|
131
145
|
|
|
132
146
|
* report inactive main rulesets in github doctor ([#682](https://github.com/0xPlayerOne/code-foundry/issues/682)) ([695a0b4](https://github.com/0xPlayerOne/code-foundry/commit/695a0b437910aa8e664a481c1648dbadcc1a2de8))
|
|
133
147
|
|
|
134
|
-
## [1.39.0](https://github.com/0xPlayerOne/code-foundry/compare/v1.38.1...v1.39.0) (2026-10-01)
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
### Features
|
|
138
|
-
|
|
139
|
-
* **ci:** surface ungated scheduled workflows in the billing pause controls ([#681](https://github.com/0xPlayerOne/code-foundry/issues/681)) ([ef48f9a](https://github.com/0xPlayerOne/code-foundry/commit/ef48f9a25aa0b22f82b0ed8a512bc1a65d08d8e9))
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
### Maintenance
|
|
143
|
-
|
|
144
|
-
* register the adea-ai ui and themes consumers in the fleet manifest ([#680](https://github.com/0xPlayerOne/code-foundry/issues/680)) ([f50e6c6](https://github.com/0xPlayerOne/code-foundry/commit/f50e6c6a4ef4b7f0396cdce21f53070fec818c50))
|
|
145
|
-
|
|
146
|
-
## [1.38.1](https://github.com/0xPlayerOne/code-foundry/compare/v1.38.0...v1.38.1) (2026-09-30)
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
### Bug Fixes
|
|
150
|
-
|
|
151
|
-
* normalize blank runs when stripping legacy managed markers ([#678](https://github.com/0xPlayerOne/code-foundry/issues/678)) ([acd5afc](https://github.com/0xPlayerOne/code-foundry/commit/acd5afce12b3de3b3574259639e89067e1ab3cb0))
|
|
152
|
-
|
|
153
148
|
<!-- code-foundry: packaged changelog -->
|
|
154
149
|
|
|
155
150
|
---
|
|
156
151
|
|
|
157
|
-
This packaged changelog lists the 20 most recent releases;
|
|
152
|
+
This packaged changelog lists the 20 most recent releases; 230 older releases are omitted to keep the package small.
|
|
158
153
|
See the [full changelog](https://github.com/0xPlayerOne/code-foundry/blob/main/CHANGELOG.md) for the complete history.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "code-foundry",
|
|
3
|
-
"version": "1.44.
|
|
3
|
+
"version": "1.44.10",
|
|
4
4
|
"description": "A fast, language-aware repository factory for agent-ready workflows, testing, security, and release automation.",
|
|
5
5
|
"homepage": "https://github.com/0xPlayerOne/code-foundry#readme",
|
|
6
6
|
"bugs": {
|