Skip to content

Commit 66d7255

Browse files
authored
Merge pull request #2938 from github/cklin/default-query-filters
Keep user-provided query filters first
2 parents ef36b69 + 65abb79 commit 66d7255

13 files changed

+74
-115
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
44

55
## [UNRELEASED]
66

7-
No user facing changes.
7+
- Fix bug in PR analysis where user-provided `include` query filter fails to exclude non-included queries. [#2938](https://github.com/github/codeql-action/pull/2938)
88

99
## 3.29.0 - 11 Jun 2025
1010

lib/codeql.js

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/codeql.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/codeql.test.js

Lines changed: 10 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/codeql.test.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/config-utils.js

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/config-utils.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/config-utils.test.js

Lines changed: 7 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/config-utils.test.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/codeql.test.ts

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ import * as actionsUtil from "./actions-util";
1414
import { GitHubApiDetails } from "./api-client";
1515
import { CliError } from "./cli-errors";
1616
import * as codeql from "./codeql";
17-
import { AugmentationProperties, Config } from "./config-utils";
17+
import {
18+
AugmentationProperties,
19+
Config,
20+
defaultAugmentationProperties,
21+
} from "./config-utils";
1822
import * as defaults from "./defaults.json";
1923
import { DocUrl } from "./doc-url";
2024
import { FeatureEnablement } from "./feature-flags";
@@ -537,8 +541,7 @@ test(
537541
"basic",
538542
injectedConfigMacro,
539543
{
540-
queriesInputCombines: false,
541-
packsInputCombines: false,
544+
...defaultAugmentationProperties,
542545
},
543546
{},
544547
{},
@@ -548,8 +551,7 @@ test(
548551
"injected packs from input",
549552
injectedConfigMacro,
550553
{
551-
queriesInputCombines: false,
552-
packsInputCombines: false,
554+
...defaultAugmentationProperties,
553555
packsInput: ["xxx", "yyy"],
554556
},
555557
{},
@@ -562,7 +564,7 @@ test(
562564
"injected packs from input with existing packs combines",
563565
injectedConfigMacro,
564566
{
565-
queriesInputCombines: false,
567+
...defaultAugmentationProperties,
566568
packsInputCombines: true,
567569
packsInput: ["xxx", "yyy"],
568570
},
@@ -584,8 +586,7 @@ test(
584586
"injected packs from input with existing packs overrides",
585587
injectedConfigMacro,
586588
{
587-
queriesInputCombines: false,
588-
packsInputCombines: false,
589+
...defaultAugmentationProperties,
589590
packsInput: ["xxx", "yyy"],
590591
},
591592
{
@@ -605,8 +606,7 @@ test(
605606
"injected queries from input",
606607
injectedConfigMacro,
607608
{
608-
queriesInputCombines: false,
609-
packsInputCombines: false,
609+
...defaultAugmentationProperties,
610610
queriesInput: [{ uses: "xxx" }, { uses: "yyy" }],
611611
},
612612
{},
@@ -626,8 +626,7 @@ test(
626626
"injected queries from input overrides",
627627
injectedConfigMacro,
628628
{
629-
queriesInputCombines: false,
630-
packsInputCombines: false,
629+
...defaultAugmentationProperties,
631630
queriesInput: [{ uses: "xxx" }, { uses: "yyy" }],
632631
},
633632
{
@@ -651,8 +650,8 @@ test(
651650
"injected queries from input combines",
652651
injectedConfigMacro,
653652
{
653+
...defaultAugmentationProperties,
654654
queriesInputCombines: true,
655-
packsInputCombines: false,
656655
queriesInput: [{ uses: "xxx" }, { uses: "yyy" }],
657656
},
658657
{
@@ -679,6 +678,7 @@ test(
679678
"injected queries from input combines 2",
680679
injectedConfigMacro,
681680
{
681+
...defaultAugmentationProperties,
682682
queriesInputCombines: true,
683683
packsInputCombines: true,
684684
queriesInput: [{ uses: "xxx" }, { uses: "yyy" }],
@@ -700,6 +700,7 @@ test(
700700
"injected queries and packs, but empty",
701701
injectedConfigMacro,
702702
{
703+
...defaultAugmentationProperties,
703704
queriesInputCombines: true,
704705
packsInputCombines: true,
705706
queriesInput: [],

0 commit comments

Comments
 (0)