Merged
Conversation
Using defaultAugmentationProperties to generated expected test output eliminates the need to change individual tests when we add a new field to AugmentationProperties.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR ensures that user-defined query filters are applied before any automatically added exclusions, fixing a bug where user “include” filters were overridden.
- Renamed
defaultQueryFilterstoextraQueryExclusionsacross the config API. - Updated
calculateAugmentationandgenerateCodeScanningConfigto use the new property and preserve user filter ordering. - Adjusted tests, generated JS files, and the changelog to match the renaming and logic changes.
Reviewed Changes
Copilot reviewed 9 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/config-utils.ts | Renamed property and updated augmentation logic. |
| src/config-utils.test.ts | Simplified test fixtures by spreading defaultAugmentationProperties. |
| src/codeql.ts | reordered query-filters array and added explanatory comment. |
| src/codeql.test.ts | Imported and used defaultAugmentationProperties in tests. |
| lib/config-utils.js | Propagated renaming and logic updates to compiled output. |
| lib/codeql.js | Updated filter ordering logic and comments in compiled output. |
| CHANGELOG.md | Added release note for the bug fix. |
Comments suppressed due to low confidence (1)
src/codeql.ts:1273
- Add a unit test that verifies user-provided query filters appear before extra query exclusions in the generated CodeQL configuration.
...(augmentedConfig["query-filters"] || []),
This commit renames AugmentationProperties.defaultQueryFilters to extraQueryExclusions, and changes its type to ExcludeQueryFilter[]. It matters whether we are adding query inclusions or exclusions, and this renaming makes that distinction clearer.
1b923a3 to
65abb79
Compare
aeisenberg
approved these changes
Jun 19, 2025
Contributor
aeisenberg
left a comment
There was a problem hiding this comment.
Good catch. This makes sense.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes a bug in PR analysis where user-provided
includequery filter fails to exclude non-included queries.Merge / deployment checklist