-
Notifications
You must be signed in to change notification settings - Fork 413
Update deprecation warnings for CodeQL Action to v4 #3272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 6 commits
1aade29
5a9b49d
ba82f9b
f1ca6a4
08dc635
b32a1e0
c443dff
9366f80
a570795
5aa2d63
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1114,38 +1114,38 @@ export async function checkDiskUsage( | |||||||||
| } | ||||||||||
|
|
||||||||||
| /** | ||||||||||
| * Prompt the customer to upgrade to CodeQL Action v3, if appropriate. | ||||||||||
| * Prompt the customer to upgrade to CodeQL Action v4, if appropriate. | ||||||||||
| * | ||||||||||
| * Check whether a customer is running v1 or v2. If they are, and we can determine that the GitHub | ||||||||||
| * instance supports v3, then log an error prompting the customer to upgrade to v3. | ||||||||||
| * Check whether a customer is running v1, v2, or v3. If they are, and we can determine that the GitHub | ||||||||||
| * instance supports v4, then log an error prompting the customer to upgrade to v4. | ||||||||||
|
Comment on lines
+1119
to
+1120
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
| */ | ||||||||||
| export function checkActionVersion( | ||||||||||
| version: string, | ||||||||||
| githubVersion: GitHubVersion, | ||||||||||
| ) { | ||||||||||
| if ( | ||||||||||
| !semver.satisfies(version, ">=3") && // do not log error if the customer is already running v3 | ||||||||||
| !semver.satisfies(version, ">=4") && // do not log error if the customer is already running v4 | ||||||||||
| !process.env[EnvVar.LOG_VERSION_DEPRECATION] // do not log error if we have already | ||||||||||
| ) { | ||||||||||
| // Only error for versions of GHES that are compatible with CodeQL Action version 3. | ||||||||||
| // Only error for versions of GHES that are compatible with CodeQL Action version 4. | ||||||||||
| // | ||||||||||
| // GHES 3.11 shipped without the v3 tag, but it also shipped without this warning message code. | ||||||||||
| // Therefore users who are seeing this warning message code have pulled in a new version of the | ||||||||||
| // Action, and with it the v3 tag. | ||||||||||
| // GHES 3.19 shipped without the v4 tag, but it also shipped without this warning message code. | ||||||||||
| // Therefore, users who are seeing this warning message code have pulled in a new version of the | ||||||||||
| // Action, and with it the v4 tag. | ||||||||||
mario-campos marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||
| if ( | ||||||||||
| githubVersion.type === GitHubVariant.DOTCOM || | ||||||||||
| githubVersion.type === GitHubVariant.GHE_DOTCOM || | ||||||||||
| (githubVersion.type === GitHubVariant.GHES && | ||||||||||
| semver.satisfies( | ||||||||||
| semver.coerce(githubVersion.version) ?? "0.0.0", | ||||||||||
| ">=3.11", | ||||||||||
| ">=3.20", | ||||||||||
mario-campos marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
| )) | ||||||||||
| ) { | ||||||||||
| core.error( | ||||||||||
| "CodeQL Action major versions v1 and v2 have been deprecated. " + | ||||||||||
| "Please update all occurrences of the CodeQL Action in your workflow files to v3. " + | ||||||||||
| "CodeQL Action major versions v1, v2, and v3 have either been deprecated or will soon be deprecated. " + | ||||||||||
mario-campos marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||
| "Please update all occurrences of the CodeQL Action in your workflow files to v4. " + | ||||||||||
| "For more information, see " + | ||||||||||
| "https://github.blog/changelog/2025-01-10-code-scanning-codeql-action-v2-is-now-deprecated/", | ||||||||||
| "https://github.blog/changelog/2025-10-28-upcoming-deprecation-of-codeql-action-v3/", | ||||||||||
| ); | ||||||||||
| // set LOG_VERSION_DEPRECATION env var to prevent the warning from being logged multiple times | ||||||||||
| core.exportVariable(EnvVar.LOG_VERSION_DEPRECATION, "true"); | ||||||||||
|
|
||||||||||
Uh oh!
There was an error while loading. Please reload this page.