Extend url2purl/purl2url coverage for Git-based source hosts#223
Open
ziadhany wants to merge 12 commits intopackage-url:mainfrom
Open
Extend url2purl/purl2url coverage for Git-based source hosts#223ziadhany wants to merge 12 commits intopackage-url:mainfrom
ziadhany wants to merge 12 commits intopackage-url:mainfrom
Conversation
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Add more tests Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Add more test Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Add a test Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Add a test Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
7 tasks
Add support for gitbox.apache.org Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Contributor
Author
|
@TG1999 @keshav-space This PR is ready for review!. Take a look whenever you have a chance. |
pombredanne
reviewed
Mar 6, 2026
pombredanne
reviewed
Mar 6, 2026
pombredanne
reviewed
Mar 6, 2026
pombredanne
reviewed
Mar 6, 2026
| commit_match = re.search(gitea_commit_pattern, url) | ||
| if commit_match: | ||
| return PackageURL( | ||
| type="generic", |
pombredanne
reviewed
Mar 6, 2026
| return None | ||
|
|
||
| return PackageURL( | ||
| type="generic", |
Member
There was a problem hiding this comment.
There is in emerging git PURL for that from @darakian
pombredanne
reviewed
Mar 6, 2026
|
|
||
| if match := re.search(kernel_shorthand, url): | ||
| res = match.groupdict() | ||
| namespace = "git.kernel.org/pub/scm/linux/kernel/git/stable/" |
Member
There was a problem hiding this comment.
This needs thinking and there is a emerging PURL registry that will cater to the kernel needs.
pombredanne
reviewed
Mar 6, 2026
| match = re.search(gitiles_project_pattern, url) | ||
| if match: | ||
| return PackageURL( | ||
| type="generic", |
Member
There was a problem hiding this comment.
Likely also a candidate for the new git PURL type
pombredanne
reviewed
Mar 6, 2026
| commit_match = re.search(allura_pattern, url) | ||
| if commit_match: | ||
| return PackageURL( | ||
| type="generic", |
Member
There was a problem hiding this comment.
We may have a sourceforge type? Or this is for a git type
pombredanne
requested changes
Mar 6, 2026
Member
pombredanne
left a comment
There was a problem hiding this comment.
Looking great ... we need some PURL type refinements.
…t repositories. Treat GitLab subdomains as GitLab when using the repository URL instead of a generic type. Add support for salsa.debian.org, gitlab.eclipse.org, forge.fedoraproject.org domains Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, many fix-commit URLs are not converted to PURLs during collection. Adding support for these URLs would ensure more accurate url2purl and purl2url conversions, as well as generating commit and patch URLs from PURLs.
cgit/repo/commit/?id=HASHGitweb/?p=repo.git;a=commit;h=HASHApache Allura/p/project/repo/ci/HASH/Gitiles/repo/+/HASHgitea / forgejocommit/{HASH}"Related issue: