code-foundry 0.31.7 → 0.31.9
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/code-foundry.yml +1 -1
- package/.github/workflows/ci.yml +1 -1
- package/.github/workflows/codeql.yml +1 -1
- package/.github/workflows/release.yml +1 -1
- package/.github/workflows/security.yml +1 -1
- package/.github/workflows/test.yml +1 -1
- package/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/src/lib/github-doctor.mjs +10 -8
package/.github/code-foundry.yml
CHANGED
package/.github/workflows/ci.yml
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.31.9](https://github.com/0xPlayerOne/code-foundry/compare/v0.31.8...v0.31.9) (2026-07-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **doctor:** deduplicate required check contexts ([f244494](https://github.com/0xPlayerOne/code-foundry/commit/f24449448f177c99978fe216b92385909f275d89))
|
|
9
|
+
|
|
10
|
+
## [0.31.8](https://github.com/0xPlayerOne/code-foundry/compare/v0.31.7...v0.31.8) (2026-07-30)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **runtime:** pin self workflows to v0.31.7 ([565b5bc](https://github.com/0xPlayerOne/code-foundry/commit/565b5bcc2b8f4ade8b3addc02f72c96a42308325))
|
|
16
|
+
|
|
3
17
|
## [0.31.7](https://github.com/0xPlayerOne/code-foundry/compare/v0.31.6...v0.31.7) (2026-07-30)
|
|
4
18
|
|
|
5
19
|
|
package/package.json
CHANGED
|
@@ -18,10 +18,7 @@ export function doctorGithub(root) {
|
|
|
18
18
|
const protection = ghJson(['api', `repos/${repository}/branches/main/protection`])
|
|
19
19
|
if (!protection) warnings.push('main branch protection is not readable or is not configured.')
|
|
20
20
|
else {
|
|
21
|
-
const required =
|
|
22
|
-
...(protection.required_status_checks?.contexts ?? []),
|
|
23
|
-
...(protection.required_status_checks?.checks ?? []).map(/** @param {any} check */ (check) => check.context),
|
|
24
|
-
].filter(Boolean)
|
|
21
|
+
const required = requiredContexts(protection)
|
|
25
22
|
details.requiredChecks = required
|
|
26
23
|
const duplicateNames = required.filter((name) => /\b([^/]+) \/ \1\b/i.test(name))
|
|
27
24
|
if (duplicateNames.length) errors.push(`required checks contain duplicate workflow prefixes: ${duplicateNames.join(', ')}`)
|
|
@@ -34,10 +31,7 @@ export function doctorGithub(root) {
|
|
|
34
31
|
details.observedChecks = observed
|
|
35
32
|
if (!observed.length) warnings.push('no check runs were observed on the current main commit; exact check validation is deferred until CI runs.')
|
|
36
33
|
if (protection?.required_status_checks) {
|
|
37
|
-
const required =
|
|
38
|
-
...(protection.required_status_checks.contexts ?? []),
|
|
39
|
-
...(protection.required_status_checks.checks ?? []).map(/** @param {any} check */ (check) => check.context),
|
|
40
|
-
].filter(Boolean)
|
|
34
|
+
const required = requiredContexts(protection)
|
|
41
35
|
const missing = required.filter((name) => observed.length && !observed.includes(name))
|
|
42
36
|
if (missing.length) warnings.push(`required checks not observed on current main: ${missing.join(', ')}`)
|
|
43
37
|
}
|
|
@@ -75,6 +69,14 @@ export function doctorGithub(root) {
|
|
|
75
69
|
return { errors, warnings, details }
|
|
76
70
|
}
|
|
77
71
|
|
|
72
|
+
/** @param {any} protection @returns {string[]} */
|
|
73
|
+
function requiredContexts(protection) {
|
|
74
|
+
return [...new Set([
|
|
75
|
+
...(protection.required_status_checks?.contexts ?? []),
|
|
76
|
+
...(protection.required_status_checks?.checks ?? []).map(/** @param {any} check */ (check) => check.context),
|
|
77
|
+
].filter(Boolean))]
|
|
78
|
+
}
|
|
79
|
+
|
|
78
80
|
/** @param {string} root @returns {{ errors: string[], warnings: string[] }} */
|
|
79
81
|
function inspectWorkflows(root) {
|
|
80
82
|
/** @type {string[]} */
|