GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Keep user-provided query filters first by cklin · Pull Request #2938 · github/codeql-action

Conversation

@cklin

@cklin cklin commented Jun 19, 2025

Copy link
Copy Markdown
Contributor

This PR fixes a bug in PR analysis where user-provided include query filter fails to exclude non-included queries.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@cklin
Use defaultAugmentationProperties in tests
1764e3d
Using defaultAugmentationProperties to generated expected test output
eliminates the need to change individual tests when we add a new field
to AugmentationProperties.
@cklin
cklin marked this pull request as ready for review June 19, 2025 19:04
Copilot AI review requested due to automatic review settings June 19, 2025 19:04
@cklin
cklin requested a review from a team as a code owner June 19, 2025 19:04
Copilot AI reviewed Jun 19, 2025
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 defaultQueryFilters to extraQueryExclusions across the config API.
  • Updated calculateAugmentation and generateCodeScanningConfig to 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"] || []),

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/config-utils.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

cklin added 3 commits June 19, 2025 12:19
@cklin
Rename defaultQueryFilters
f5304e7
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.
@cklin
Keep user-provided query filters first
0b8d151
@cklin
build: refresh js files
65abb79
@cklin
cklin force-pushed the cklin/default-query-filters branch from 1b923a3 to 65abb79 Compare June 19, 2025 19:20
aeisenberg
aeisenberg approved these changes Jun 19, 2025
View reviewed changes

@aeisenberg aeisenberg left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. This makes sense.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@cklin
cklin merged commit 66d7255 into main Jun 19, 2025
@cklin
cklin deleted the cklin/default-query-filters branch June 19, 2025 20:46
@github-actions github-actions Bot mentioned this pull request Jun 27, 2025
Merge main into releases/v3 #2953
Merged
8 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@aeisenberg aeisenberg aeisenberg approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@cklin @aeisenberg
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.