-
Notifications
You must be signed in to change notification settings - Fork 316
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
Simplify CodeQL setup now that the last two releases have semver bundles #1761
Simplify CodeQL setup now that the last two releases have semver bundles #1761
Conversation
The default version feature flags will now always point to a CLI version with a semantically versioned bundle, so we can find the GitHub Release directly from the CLI version.
Previously, this was useful for discriminating between different `CodeQLDefaultVersion` instances. However now all instances return a tag name.
src/setup-codeql.ts
Fixed
if (!codeqlFolder && (cliVersion || tagName)) { | ||
if (cliVersion || tagName) { | ||
if (!codeqlFolder && tagName) { | ||
if (tagName) { |
Check warning
Code scanning / CodeQL
Useless conditional Warning
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.
🥳
url = await getCodeQLBundleDownloadURL( | ||
tagName, | ||
tagName!, |
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.
TIL about this operator 🤯
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.
It's not the best sign when you have to use it, but here it didn't seem worth refactoring the types :)
Now that the last two CLI versions have semantically versioned bundles, we no longer need to handle the case where the default version feature flags specify a version that doesn't have a semantically versioned bundle. As a result, we can reduce the complexity of the setup code!
Merge / deployment checklist