Skip to content

Commit cc4fead

Browse files
committed
update version in various hardcoded locations
1 parent 5b52b36 commit cc4fead

File tree

4 files changed

+45
-45
lines changed

4 files changed

+45
-45
lines changed

src/autobuild.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ export async function determineAutobuildLanguages(
3838
* For example, consider a user with the following workflow file:
3939
*
4040
* ```yml
41-
* - uses: github/codeql-action/init@v2
41+
* - uses: github/codeql-action/init@v3
4242
* with:
4343
* languages: go, java
44-
* - uses: github/codeql-action/autobuild@v2
45-
* - uses: github/codeql-action/analyze@v2
44+
* - uses: github/codeql-action/autobuild@v3
45+
* - uses: github/codeql-action/analyze@v3
4646
* ```
4747
*
4848
* - With Go extraction disabled, we will run the Java autobuilder in the

src/codeql.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,7 @@ export async function getCodeQLForCmd(
11591159
"version of the CLI using the 'tools' input to the 'init' Action, you can remove this " +
11601160
"input to use the default version.\n\n" +
11611161
"Alternatively, if you want to continue using CodeQL CLI version " +
1162-
`${result.version}, you can replace 'github/codeql-action/*@v2' by ` +
1162+
`${result.version}, you can replace 'github/codeql-action/*@v3' by ` +
11631163
`'github/codeql-action/*@v${getActionVersion()}' in your code scanning workflow to ` +
11641164
"continue using this version of the CodeQL Action.",
11651165
);

src/init-action-post-helper.test.ts

+12-12
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ test("uploads failed SARIF run with `diagnostics export` if feature flag is off"
9191
},
9292
{
9393
name: "Initialize CodeQL",
94-
uses: "github/codeql-action/init@v2",
94+
uses: "github/codeql-action/init@v3",
9595
with: {
9696
languages: "javascript",
9797
},
9898
},
9999
{
100100
name: "Perform CodeQL Analysis",
101-
uses: "github/codeql-action/analyze@v2",
101+
uses: "github/codeql-action/analyze@v3",
102102
with: {
103103
category: "my-category",
104104
},
@@ -115,14 +115,14 @@ test("uploads failed SARIF run with `diagnostics export` if the database doesn't
115115
},
116116
{
117117
name: "Initialize CodeQL",
118-
uses: "github/codeql-action/init@v2",
118+
uses: "github/codeql-action/init@v3",
119119
with: {
120120
languages: "javascript",
121121
},
122122
},
123123
{
124124
name: "Perform CodeQL Analysis",
125-
uses: "github/codeql-action/analyze@v2",
125+
uses: "github/codeql-action/analyze@v3",
126126
with: {
127127
category: "my-category",
128128
},
@@ -142,14 +142,14 @@ test("uploads failed SARIF run with database export-diagnostics if the database
142142
},
143143
{
144144
name: "Initialize CodeQL",
145-
uses: "github/codeql-action/init@v2",
145+
uses: "github/codeql-action/init@v3",
146146
with: {
147147
languages: "javascript",
148148
},
149149
},
150150
{
151151
name: "Perform CodeQL Analysis",
152-
uses: "github/codeql-action/analyze@v2",
152+
uses: "github/codeql-action/analyze@v3",
153153
with: {
154154
category: "my-category",
155155
},
@@ -199,14 +199,14 @@ for (const { uploadInput, shouldUpload } of UPLOAD_INPUT_TEST_CASES) {
199199
},
200200
{
201201
name: "Initialize CodeQL",
202-
uses: "github/codeql-action/init@v2",
202+
uses: "github/codeql-action/init@v3",
203203
with: {
204204
languages: "javascript",
205205
},
206206
},
207207
{
208208
name: "Perform CodeQL Analysis",
209-
uses: "github/codeql-action/analyze@v2",
209+
uses: "github/codeql-action/analyze@v3",
210210
with: {
211211
category: "my-category",
212212
upload: uploadInput,
@@ -234,14 +234,14 @@ test("uploading failed SARIF run succeeds when workflow uses an input with a mat
234234
},
235235
{
236236
name: "Initialize CodeQL",
237-
uses: "github/codeql-action/init@v2",
237+
uses: "github/codeql-action/init@v3",
238238
with: {
239239
languages: "javascript",
240240
},
241241
},
242242
{
243243
name: "Perform CodeQL Analysis",
244-
uses: "github/codeql-action/analyze@v2",
244+
uses: "github/codeql-action/analyze@v3",
245245
with: {
246246
category: "/language:${{ matrix.language }}",
247247
},
@@ -261,14 +261,14 @@ test("uploading failed SARIF run fails when workflow uses a complex upload input
261261
},
262262
{
263263
name: "Initialize CodeQL",
264-
uses: "github/codeql-action/init@v2",
264+
uses: "github/codeql-action/init@v3",
265265
with: {
266266
languages: "javascript",
267267
},
268268
},
269269
{
270270
name: "Perform CodeQL Analysis",
271-
uses: "github/codeql-action/analyze@v2",
271+
uses: "github/codeql-action/analyze@v3",
272272
with: {
273273
upload: "${{ matrix.language != 'csharp' }}",
274274
},

src/workflow.test.ts

+29-29
Original file line numberDiff line numberDiff line change
@@ -396,9 +396,9 @@ async function testLanguageAliases(
396396
},
397397
},
398398
steps: [
399-
{ uses: "actions/checkout@v2" },
400-
{ uses: "github/codeql-action/init@v2" },
401-
{ uses: "github/codeql-action/analyze@v2" },
399+
{ uses: "actions/checkout@v3" },
400+
{ uses: "github/codeql-action/init@v3" },
401+
{ uses: "github/codeql-action/analyze@v3" },
402402
],
403403
},
404404
},
@@ -516,11 +516,11 @@ test("getWorkflowErrors() should only report the current job's CheckoutWrongHead
516516
test:
517517
steps:
518518
- run: "git checkout HEAD^2"
519-
519+
520520
test2:
521521
steps:
522522
- run: "git checkout HEAD^2"
523-
523+
524524
test3:
525525
steps: []
526526
`) as Workflow,
@@ -546,11 +546,11 @@ test("getWorkflowErrors() should not report a different job's CheckoutWrongHead"
546546
test:
547547
steps:
548548
- run: "git checkout HEAD^2"
549-
549+
550550
test2:
551551
steps:
552552
- run: "git checkout HEAD^2"
553-
553+
554554
test3:
555555
steps: []
556556
`) as Workflow,
@@ -652,9 +652,9 @@ test("getCategoryInputOrThrow returns category for simple workflow with category
652652
analysis:
653653
runs-on: ubuntu-latest
654654
steps:
655-
- uses: actions/checkout@v2
656-
- uses: github/codeql-action/init@v2
657-
- uses: github/codeql-action/analyze@v2
655+
- uses: actions/checkout@v3
656+
- uses: github/codeql-action/init@v3
657+
- uses: github/codeql-action/analyze@v3
658658
with:
659659
category: some-category
660660
`) as Workflow,
@@ -674,9 +674,9 @@ test("getCategoryInputOrThrow returns undefined for simple workflow without cate
674674
analysis:
675675
runs-on: ubuntu-latest
676676
steps:
677-
- uses: actions/checkout@v2
678-
- uses: github/codeql-action/init@v2
679-
- uses: github/codeql-action/analyze@v2
677+
- uses: actions/checkout@v3
678+
- uses: github/codeql-action/init@v3
679+
- uses: github/codeql-action/analyze@v3
680680
`) as Workflow,
681681
"analysis",
682682
{},
@@ -694,19 +694,19 @@ test("getCategoryInputOrThrow returns category for workflow with multiple jobs",
694694
foo:
695695
runs-on: ubuntu-latest
696696
steps:
697-
- uses: actions/checkout@v2
698-
- uses: github/codeql-action/init@v2
697+
- uses: actions/checkout@v3
698+
- uses: github/codeql-action/init@v3
699699
- runs: ./build foo
700-
- uses: github/codeql-action/analyze@v2
700+
- uses: github/codeql-action/analyze@v3
701701
with:
702702
category: foo-category
703703
bar:
704704
runs-on: ubuntu-latest
705705
steps:
706-
- uses: actions/checkout@v2
707-
- uses: github/codeql-action/init@v2
706+
- uses: actions/checkout@v3
707+
- uses: github/codeql-action/init@v3
708708
- runs: ./build bar
709-
- uses: github/codeql-action/analyze@v2
709+
- uses: github/codeql-action/analyze@v3
710710
with:
711711
category: bar-category
712712
`) as Workflow,
@@ -729,11 +729,11 @@ test("getCategoryInputOrThrow finds category for workflow with language matrix",
729729
matrix:
730730
language: [javascript, python]
731731
steps:
732-
- uses: actions/checkout@v2
733-
- uses: github/codeql-action/init@v2
732+
- uses: actions/checkout@v3
733+
- uses: github/codeql-action/init@v3
734734
with:
735735
language: \${{ matrix.language }}
736-
- uses: github/codeql-action/analyze@v2
736+
- uses: github/codeql-action/analyze@v3
737737
with:
738738
category: "/language:\${{ matrix.language }}"
739739
`) as Workflow,
@@ -753,9 +753,9 @@ test("getCategoryInputOrThrow throws error for workflow with dynamic category",
753753
jobs:
754754
analysis:
755755
steps:
756-
- uses: actions/checkout@v2
757-
- uses: github/codeql-action/init@v2
758-
- uses: github/codeql-action/analyze@v2
756+
- uses: actions/checkout@v3
757+
- uses: github/codeql-action/init@v3
758+
- uses: github/codeql-action/analyze@v3
759759
with:
760760
category: "\${{ github.workflow }}"
761761
`) as Workflow,
@@ -780,12 +780,12 @@ test("getCategoryInputOrThrow throws error for workflow with multiple calls to a
780780
analysis:
781781
runs-on: ubuntu-latest
782782
steps:
783-
- uses: actions/checkout@v2
784-
- uses: github/codeql-action/init@v2
785-
- uses: github/codeql-action/analyze@v2
783+
- uses: actions/checkout@v3
784+
- uses: github/codeql-action/init@v3
785+
- uses: github/codeql-action/analyze@v3
786786
with:
787787
category: some-category
788-
- uses: github/codeql-action/analyze@v2
788+
- uses: github/codeql-action/analyze@v3
789789
with:
790790
category: another-category
791791
`) as Workflow,

0 commit comments

Comments
 (0)