Skip to content
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

When downloading the CodeQL bundle, only use the GitHub AE endpoint on GitHub AE, and check it first. #409

Merged
merged 2 commits into from
Mar 10, 2021

Conversation

chrisgavin
Copy link
Contributor

This makes the requests to find the CodeQL bundle a bit more efficient. Firstly there's no point trying the GitHub AE endpoint when we're not on GitHub AE, so I've threaded through the GitHub variant and skipped that endpoint unless it's GHAE.

Secondly, if we are on GitHub AE we should check that endpoint first since the other endpoints are much less likely to work.

Merge / deployment checklist

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

@@ -101,9 +101,7 @@ async function run() {
};

const gitHubVersion = await getGitHubVersion(apiDetails);
if (gitHubVersion !== undefined) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think these are safe to remove. getGitHubVersion seems to always return an answer.

@chrisgavin chrisgavin force-pushed the check-ghae-endpoint-first-only-on-ghae branch from 8b7e246 to ae71f88 Compare March 7, 2021 09:56
@chrisgavin chrisgavin force-pushed the check-ghae-endpoint-first-only-on-ghae branch from ae71f88 to bb51ece Compare March 7, 2021 11:18
@chrisgavin chrisgavin marked this pull request as ready for review March 7, 2021 11:32
Copy link
Contributor

@robertbrignull robertbrignull left a comment

Choose a reason for hiding this comment

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

LGTM

@chrisgavin chrisgavin merged commit cfec2bb into main Mar 10, 2021
@chrisgavin chrisgavin deleted the check-ghae-endpoint-first-only-on-ghae branch March 10, 2021 13:03
@github-actions github-actions bot mentioned this pull request Mar 15, 2021
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.

2 participants