Skip to content

Commit aeabef7

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/npm-minor-77d26487b0
2 parents ce27e95 + 78357d3 commit aeabef7

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/codescanning-config-cli.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,33 @@ jobs:
7070
with:
7171
version: ${{ matrix.version }}
7272

73-
- name: Empty file
73+
# On PRs, overlay analysis may change the config that is passed to the CLI.
74+
# Therefore, we have two variants of the following test, one for PRs and one for other events.
75+
- name: Empty file (non-PR)
76+
if: github.event_name != 'pull_request'
7477
uses: ./../action/.github/actions/check-codescanning-config
7578
with:
7679
expected-config-file-contents: "{}"
7780
languages: javascript
7881
tools: ${{ steps.prepare-test.outputs.tools-url }}
7982

83+
- name: Empty file (PR)
84+
if: github.event_name == 'pull_request'
85+
uses: ./../action/.github/actions/check-codescanning-config
86+
with:
87+
expected-config-file-contents: |
88+
{
89+
"query-filters": [
90+
{
91+
"exclude": {
92+
"tags": "exclude-from-incremental"
93+
}
94+
}
95+
]
96+
}
97+
languages: javascript
98+
tools: ${{ steps.prepare-test.outputs.tools-url }}
99+
80100
- name: Packs from input
81101
if: success() || failure()
82102
uses: ./../action/.github/actions/check-codescanning-config

0 commit comments

Comments
 (0)