-
Notifications
You must be signed in to change notification settings - Fork 351
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
Refactor CodeQL setup #1462
Refactor CodeQL setup #1462
Conversation
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.
Thank you for this!!!! It's so much clearer now. And, I learned that we have AssertNever
now
variant: util.GitHubVariant, | ||
logger: Logger | ||
): Promise<CodeQLToolsSource> { | ||
if (toolsInput && toolsInput !== "latest" && !toolsInput.startsWith("http")) { |
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.
Minor:
if (toolsInput && toolsInput !== "latest" && !toolsInput.startsWith("http")) { | |
if (toolsInput !== "latest" && !toolsInput?.startsWith("http")) { |
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.
I think that would start accepting toolsInput === undefined
, which we don't want here.
src/codeql.ts
Outdated
logger.debug("Downloading CodeQL bundle with token."); | ||
headers.authorization = `token ${apiDetails.auth}`; | ||
} else { | ||
logger.debug("Downloading CodeQL bundle without token."); |
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.
In this case, the URL may still have a token
search param, Should we explicitly remove it?
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.
Looks like this was always here, so maybe not a problem?
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.
"without adding token" would be more accurate — the goal here is to log that we aren't using the token
input to init
here.
This PR refactors how the Action sets up the CodeQL tools. The aim is to make the code more readable and to set the stage for improving how we roll out new CodeQL versions.
Merge / deployment checklist