-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(api): refactor purl API query code (#2900)
Converted PURL queries to package queries in `do_query()` to remove unnecessary code. Querying the Datastore directly with PURLs gives the same results as querying by package name, so we can simplify things by treating PURLs like regular package queries after extracting the `package/ecosystem/version`. This will also resolve issue #2842 by rewriting the PURL-to-ecosystem logic. For most ecosystems, we can get the name from `purl.type`, but for Linux distributions, we need to use `purl.namespace`.
- Loading branch information
Showing
14 changed files
with
614 additions
and
396 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
342 changes: 233 additions & 109 deletions
342
gcp/api/fixtures/IntegrationTests_api_query_response.txt
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.