Skip to content

Conversation

@henrymercer
Copy link
Contributor

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

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

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.
@henrymercer henrymercer requested a review from a team as a code owner July 7, 2023 14:19
if (!codeqlFolder && (cliVersion || tagName)) {
if (cliVersion || tagName) {
if (!codeqlFolder && tagName) {
if (tagName) {

Check warning

Code scanning / CodeQL

Useless conditional

This use of variable 'tagName' always evaluates to true.
Copy link
Contributor

@angelapwen angelapwen left a 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!,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL about this operator 🤯

Copy link
Contributor Author

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 :)

@henrymercer henrymercer enabled auto-merge July 7, 2023 14:51
@henrymercer henrymercer merged commit 85c77f1 into main Jul 7, 2023
@henrymercer henrymercer deleted the henrymercer/remove-fetching-releases-fallback branch July 7, 2023 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants