Skip to content

Display nicer names for github-downloaded databases#1294

Merged
aeisenberg merged 1 commit intomainfrom
aeisenberg/db-name-github
Apr 19, 2022
Merged

Display nicer names for github-downloaded databases#1294
aeisenberg merged 1 commit intomainfrom
aeisenberg/db-name-github

Conversation

@aeisenberg
Copy link
Copy Markdown
Contributor

@aeisenberg aeisenberg commented Apr 13, 2022

This will now name databases downloaded from github based on their nwo.

Also, this adds a new button to suggest downloading from github in an
empty databases view.

Replace this with a description of the changes your pull request makes.

Checklist

  • [n/a] 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.
  • [n/a] [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.

@aeisenberg aeisenberg requested a review from a team as a code owner April 13, 2022 22:49
@robertbrignull robertbrignull requested a review from a team April 14, 2022 09:09
Copy link
Copy Markdown
Contributor

@shati-patel shati-patel left a comment

Choose a reason for hiding this comment

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

Much nicer, thanks 😄 A few minor changes, since this is still an internal-only feature.

Comment thread extensions/ql-vscode/CHANGELOG.md Outdated
## [UNRELEASED]

- Re-enable publishing to open-vsx. [#1285](https://github.com/github/vscode-codeql/pull/1285)
- Databases downloaded from GitHub have a more user friendly name. These databases will now be named `{org}/{repo}` instead of `codeql-db`. [#1294](https://github.com/github/vscode-codeql/pull/1294)
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.

No need for a changelog entry - downloading from GitHub is still a hidden feature (due to the MRVA API being restricted)

Copy link
Copy Markdown
Contributor Author

@aeisenberg aeisenberg Apr 14, 2022

Choose a reason for hiding this comment

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

Right...

Comment thread extensions/ql-vscode/package.json Outdated
{
"view": "codeQLDatabases",
"contents": "Add a CodeQL database:\n[From a folder](command:codeQLDatabases.chooseDatabaseFolder)\n[From an archive](command:codeQLDatabases.chooseDatabaseArchive)\n[From a URL (as a zip file)](command:codeQLDatabases.chooseDatabaseInternet)\n[From LGTM](command:codeQLDatabases.chooseDatabaseLgtm)"
"contents": "Add a CodeQL database:\n[From GitHub](command:codeQLDatabases.chooseDatabaseGithub)\n[From a folder](command:codeQLDatabases.chooseDatabaseFolder)\n[From an archive](command:codeQLDatabases.chooseDatabaseArchive)\n[From a URL (as a zip file)](command:codeQLDatabases.chooseDatabaseInternet)\n[From LGTM](command:codeQLDatabases.chooseDatabaseLgtm)"
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.

As above! Unless there's a way to make this button canary-only, we should hide it until the feature is more widely available.

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.

Hmmm...no way to do that. I'll remove. I forgot it is still a canary-only feature.

Comment thread extensions/ql-vscode/src/databases.ts Outdated
ignoreSourceArchive: isQLTestDatabase,
// displayName is only set if a user explicitly renames a database
displayName: undefined,
// If a diaplayName is not passed in, the basename of folder containing the database is used.
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.

Minor :)

Suggested change
// If a diaplayName is not passed in, the basename of folder containing the database is used.
// If a displayName is not passed in, the basename of the folder containing the database is used.

This will now name databases downloaded from github based on their nwo.

Also, this adds a new button to suggest downloading from github in an
empty databases view.
@aeisenberg aeisenberg force-pushed the aeisenberg/db-name-github branch from 2b6add2 to 8f2d865 Compare April 14, 2022 19:37
Copy link
Copy Markdown
Contributor

@shati-patel shati-patel left a comment

Choose a reason for hiding this comment

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

:shipit:

@aeisenberg aeisenberg merged commit 7a8cf55 into main Apr 19, 2022
@aeisenberg aeisenberg deleted the aeisenberg/db-name-github branch April 19, 2022 23:01
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