Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
96ca55b
Ava: Run all tests in `src/` directory
mbg Sep 20, 2025
4f9b2f7
Add initial client for repository properties
mbg Sep 19, 2025
3b00d03
Load repository properties and store them in the `Config`
mbg Sep 19, 2025
6150aff
Add and use `QuerySpec` type
mbg Sep 19, 2025
ed216a0
Include queries from repo properties in `AugmentationProperties`
mbg Sep 20, 2025
781a65a
Use appropriate error message in `parseQueriesFromInput` for repo pro…
mbg Sep 20, 2025
1bfb67d
Refactor combining queries into its own function
mbg Sep 20, 2025
d14a212
Include repo property queries in `combineQueries`
mbg Sep 20, 2025
c7eb488
Add tests
mbg Sep 20, 2025
d46a178
Sort `queries` array in `check-codescanning-config`
mbg Sep 22, 2025
6bb4ad3
Update .github/actions/check-codescanning-config/index.ts
mbg Sep 22, 2025
54746c8
Fix `expected-config-file-contents`
mbg Sep 22, 2025
889d482
Add logging to `combineQueries`
mbg Sep 22, 2025
05310c6
Ignore repository property query config if CQ-only analysis
mbg Sep 22, 2025
b4f966a
Add FF to control whether to fetch repository properties
mbg Sep 22, 2025
40262b1
Add `getRepositoryProperties` to `api-client`, for easier mocking
mbg Sep 23, 2025
07920e8
Fix using `keys` instead of `values`
mbg Sep 23, 2025
7f73f8c
Add unit tests for `properties` module
mbg Sep 23, 2025
0a75581
Check that we are on dotcom
mbg Sep 23, 2025
205b6ba
Rebuild
mbg Sep 23, 2025
4178e15
Only disable `loadPropertiesFromApi` on GHES
mbg Sep 23, 2025
54bbe82
Always log when queries are configured in the repository properties
mbg Sep 23, 2025
5a4aa83
Always log when combining queries is disabled in the repo properties
mbg Sep 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/actions/check-codescanning-config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ import * as assert from 'assert'

const actualConfig = loadActualConfig()

function sortConfigArrays(config) {
for (const key of Object.keys(config)) {
const value = config[key];
if (key === 'queries' && Array.isArray(value)) {
config[key] = value.sort();
}
}
return config;
}

const rawExpectedConfig = process.argv[3].trim()
if (!rawExpectedConfig) {
core.setFailed('No expected configuration provided')
Expand All @@ -18,8 +28,8 @@ if (!rawExpectedConfig) {
const expectedConfig = rawExpectedConfig ? JSON.parse(rawExpectedConfig) : undefined;

assert.deepStrictEqual(
actualConfig,
expectedConfig,
sortConfigArrays(actualConfig),
sortConfigArrays(expectedConfig),
'Expected configuration does not match actual configuration'
);

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/codescanning-config-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,13 @@ jobs:
with:
expected-config-file-contents: |
{
"queries": [
{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/foo2/show_ifs.ql" },
{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql" }
],
"packs": {
"javascript": ["codeql-testing/codeql-pack1@1.0.0", "codeql-testing/codeql-pack2", "codeql/javascript-queries" ]
}
},
"queries": [
{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql" },
{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/foo2/show_ifs.ql" }
]
}
languages: javascript
queries: + ./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql
Expand Down
7 changes: 6 additions & 1 deletion lib/analyze-action-post.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion lib/analyze-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion lib/autobuild-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion lib/init-action-post.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading