Skip to content

Allow GitHub URL as well as NWO#1241

Merged
shati-patel merged 2 commits intomainfrom
shati-patel/download-gh-url
Mar 29, 2022
Merged

Allow GitHub URL as well as NWO#1241
shati-patel merged 2 commits intomainfrom
shati-patel/download-gh-url

Conversation

@shati-patel
Copy link
Copy Markdown
Contributor

Small follow-up to #1229.

When downloading a GH database, you can now enter a GitHub URL as well as a "name with owner" (since this is slightly easier to copy-paste). I've used similar logic as the looksLikeLgtmUrl function.

Checklist

N/A - internal only.

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@shati-patel shati-patel marked this pull request as ready for review March 28, 2022 13:52
@shati-patel shati-patel requested a review from a team as a code owner March 28, 2022 13:52
Copy link
Copy Markdown
Contributor

@aeisenberg aeisenberg left a comment

Choose a reason for hiding this comment

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

One minor thing about adding a comment, and once that is in, this can be merged.

if (uri.scheme !== 'https') {
return;
}
if (uri.authority !== 'github.com' && uri.authority !== 'www.github.com') {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In the future, we may need to support GHES. Nothing to do now, but something to keep in mind.

}
return;
} catch (e) {
return;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add a comment here about why it's ok to ignore a caught error.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Good point 😃

@shati-patel shati-patel merged commit c86c602 into main Mar 29, 2022
@shati-patel shati-patel deleted the shati-patel/download-gh-url branch March 29, 2022 11:45
@shati-patel shati-patel mentioned this pull request Mar 29, 2022
7 tasks
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