code-foundry 0.27.13 → 0.27.15
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/codeql.yml +12 -0
- package/.github/workflows/draft-pr.yml +4 -3
- package/CHANGELOG.md +16 -0
- package/package.json +1 -1
- package/src/runtime.mjs +3 -10
|
@@ -111,6 +111,9 @@ jobs:
|
|
|
111
111
|
analyze-actions:
|
|
112
112
|
name: Analyze (Actions)
|
|
113
113
|
needs: detect
|
|
114
|
+
if: >-
|
|
115
|
+
needs.detect.outputs.enabled == 'true' &&
|
|
116
|
+
needs.detect.outputs.actions_available == 'true'
|
|
114
117
|
runs-on: ${{ inputs.runner }}
|
|
115
118
|
timeout-minutes: 30
|
|
116
119
|
steps:
|
|
@@ -162,6 +165,9 @@ jobs:
|
|
|
162
165
|
analyze-typescript:
|
|
163
166
|
name: Analyze (TypeScript)
|
|
164
167
|
needs: detect
|
|
168
|
+
if: >-
|
|
169
|
+
needs.detect.outputs.enabled == 'true' &&
|
|
170
|
+
needs.detect.outputs.javascript_available == 'true'
|
|
165
171
|
runs-on: ${{ inputs.runner }}
|
|
166
172
|
timeout-minutes: 30
|
|
167
173
|
steps:
|
|
@@ -213,6 +219,9 @@ jobs:
|
|
|
213
219
|
analyze-python:
|
|
214
220
|
name: Analyze (Python)
|
|
215
221
|
needs: detect
|
|
222
|
+
if: >-
|
|
223
|
+
needs.detect.outputs.enabled == 'true' &&
|
|
224
|
+
needs.detect.outputs.python_available == 'true'
|
|
216
225
|
runs-on: ${{ inputs.runner }}
|
|
217
226
|
timeout-minutes: 30
|
|
218
227
|
steps:
|
|
@@ -264,6 +273,9 @@ jobs:
|
|
|
264
273
|
analyze-rust:
|
|
265
274
|
name: Analyze (Rust)
|
|
266
275
|
needs: detect
|
|
276
|
+
if: >-
|
|
277
|
+
needs.detect.outputs.enabled == 'true' &&
|
|
278
|
+
needs.detect.outputs.rust_available == 'true'
|
|
267
279
|
runs-on: ${{ inputs.runner }}
|
|
268
280
|
timeout-minutes: 30
|
|
269
281
|
steps:
|
|
@@ -29,7 +29,7 @@ jobs:
|
|
|
29
29
|
id: check-pr
|
|
30
30
|
run: |
|
|
31
31
|
BRANCH="${{ github.ref_name }}"
|
|
32
|
-
EXISTING=$(gh pr list --limit 1 --base staging --head "$BRANCH" --state open --json number,title 2>/dev/null | node -e 'let d=""; process.stdin.on("data", c => d += c).on("end", () => console.log(JSON.parse(d || "[]").length))')
|
|
32
|
+
EXISTING=$(gh pr list --repo "$GITHUB_REPOSITORY" --limit 1 --base staging --head "$BRANCH" --state open --json number,title 2>/dev/null | node -e 'let d=""; process.stdin.on("data", c => d += c).on("end", () => console.log(JSON.parse(d || "[]").length))')
|
|
33
33
|
echo "existing=$EXISTING" >> "$GITHUB_OUTPUT"
|
|
34
34
|
|
|
35
35
|
- name: Create
|
|
@@ -37,6 +37,7 @@ jobs:
|
|
|
37
37
|
run: |
|
|
38
38
|
BRANCH="${{ github.ref_name }}"
|
|
39
39
|
gh pr create \
|
|
40
|
+
--repo "$GITHUB_REPOSITORY" \
|
|
40
41
|
--base staging \
|
|
41
42
|
--head "$BRANCH" \
|
|
42
43
|
--draft \
|
|
@@ -51,7 +52,7 @@ jobs:
|
|
|
51
52
|
if: steps.check-pr.outputs.existing == '0'
|
|
52
53
|
run: |
|
|
53
54
|
BRANCH="${{ github.ref_name }}"
|
|
54
|
-
PR_NUMBER=$(gh pr list --limit 1 --base staging --head "$BRANCH" --state open --json number 2>/dev/null | node -e 'let d=""; process.stdin.on("data", c => d += c).on("end", () => console.log(JSON.parse(d || "[]")[0]?.number || ""))')
|
|
55
|
+
PR_NUMBER=$(gh pr list --repo "$GITHUB_REPOSITORY" --limit 1 --base staging --head "$BRANCH" --state open --json number 2>/dev/null | node -e 'let d=""; process.stdin.on("data", c => d += c).on("end", () => console.log(JSON.parse(d || "[]")[0]?.number || ""))')
|
|
55
56
|
if [ -n "$PR_NUMBER" ]; then
|
|
56
|
-
gh pr ready "$PR_NUMBER"
|
|
57
|
+
gh pr ready "$PR_NUMBER" --repo "$GITHUB_REPOSITORY"
|
|
57
58
|
fi
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.27.15](https://github.com/0xPlayerOne/code-foundry/compare/v0.27.14...v0.27.15) (2026-07-29)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **ci:** remove stale CodeQL change detection ([897d749](https://github.com/0xPlayerOne/code-foundry/commit/897d749d296c02751fda764b9fa069e32208182b))
|
|
9
|
+
|
|
10
|
+
## [0.27.14](https://github.com/0xPlayerOne/code-foundry/compare/v0.27.13...v0.27.14) (2026-07-29)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **codeql:** skip unavailable analyzers ([9ddf8e3](https://github.com/0xPlayerOne/code-foundry/commit/9ddf8e30dab4da2ba1f6bb20dd3503e56ab1b880))
|
|
16
|
+
* **draft-pr:** pass repository explicitly ([6fbf289](https://github.com/0xPlayerOne/code-foundry/commit/6fbf289649ce2097e42b156cf2db0c39fb8ceee1))
|
|
17
|
+
* **draft-pr:** use explicit repository for lookups ([e498d6e](https://github.com/0xPlayerOne/code-foundry/commit/e498d6e125099e2437041112e1b3442a7ebea389))
|
|
18
|
+
|
|
3
19
|
## [0.27.13](https://github.com/0xPlayerOne/code-foundry/compare/v0.27.12...v0.27.13) (2026-07-29)
|
|
4
20
|
|
|
5
21
|
|
package/package.json
CHANGED
package/src/runtime.mjs
CHANGED
|
@@ -275,8 +275,9 @@ function codeql() {
|
|
|
275
275
|
if (hasLanguage('typescript') || hasLanguage('javascript')) available.push('javascript-typescript')
|
|
276
276
|
if (hasLanguage('python')) available.push('python')
|
|
277
277
|
if (hasLanguage('rust')) available.push('rust')
|
|
278
|
-
|
|
279
|
-
|
|
278
|
+
// Upload every configured language on every analysis run so GitHub can
|
|
279
|
+
// compare pull requests against the base branch's code-scanning config.
|
|
280
|
+
const languagesJson = available.map((language) => ({ language, name: language === 'javascript-typescript' ? 'TypeScript' : language[0].toUpperCase() + language.slice(1), 'build-mode': 'none', changed: true }))
|
|
280
281
|
writeOutput('languages', languagesJson)
|
|
281
282
|
for (const language of ['actions', 'javascript-typescript', 'python', 'rust']) {
|
|
282
283
|
const entry = languagesJson.find((item) => item.language === language)
|
|
@@ -287,14 +288,6 @@ function codeql() {
|
|
|
287
288
|
}
|
|
288
289
|
}
|
|
289
290
|
|
|
290
|
-
/** @param {string} language @param {string} file */
|
|
291
|
-
function fileMatches(language, file) {
|
|
292
|
-
if (language === 'actions') return file.startsWith('.github/workflows/') || file.endsWith('action.yml')
|
|
293
|
-
if (language === 'javascript-typescript') return /\.(js|jsx|mjs|cjs|ts|tsx|mts|cts)$/.test(file) || /(^|\/)(package\.json|tsconfig[^/]*\.json|(?:bun|pnpm|yarn|package-lock)\.lock)$/.test(file)
|
|
294
|
-
if (language === 'python') return /\.py$|(^|\/)(pyproject\.toml|requirements[^/]*\.txt|setup\.py|Pipfile\.lock|poetry\.lock)$/.test(file)
|
|
295
|
-
return /\.rs$|(^|\/)Cargo\.(toml|lock)$/.test(file)
|
|
296
|
-
}
|
|
297
|
-
|
|
298
291
|
/** @param {string} command */
|
|
299
292
|
function printProfile(command) {
|
|
300
293
|
if (command === 'get') {
|