Extend url2purl/purl2url coverage for Git-based source hosts#223
Extend url2purl/purl2url coverage for Git-based source hosts#223ziadhany wants to merge 10 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>
Add support for gitbox.apache.org Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
|
@TG1999 @keshav-space This PR is ready for review!. Take a look whenever you have a chance. |
| }, | ||
| # sub gitlab ( excludes gitlab.com ) | ||
| ( | ||
| r"git\.codelinaro\.org.*", |
There was a problem hiding this comment.
Add salsa for Debian projects https://salsa.debian.org/public and https://gitlab.eclipse.org for Eclipse
| # gitea / forgejo | ||
| ( | ||
| r"codeberg\.org", | ||
| r"gitea\.com", |
| commit_match = re.search(gitlab_sub_commit_pattern, url) | ||
| if commit_match: | ||
| return PackageURL( | ||
| type="generic", |
There was a problem hiding this comment.
If this is GitLab-based it should be a gitlab PURL with a repository_url qualifier
| commit_match = re.search(gitea_commit_pattern, url) | ||
| if commit_match: | ||
| return PackageURL( | ||
| type="generic", |
| return None | ||
|
|
||
| return PackageURL( | ||
| type="generic", |
There was a problem hiding this comment.
There is in emerging git PURL for that from @darakian
|
|
||
| if match := re.search(kernel_shorthand, url): | ||
| res = match.groupdict() | ||
| namespace = "git.kernel.org/pub/scm/linux/kernel/git/stable/" |
There was a problem hiding this comment.
This needs thinking and there is a emerging PURL registry that will cater to the kernel needs.
| match = re.search(gitiles_project_pattern, url) | ||
| if match: | ||
| return PackageURL( | ||
| type="generic", |
There was a problem hiding this comment.
Likely also a candidate for the new git PURL type
| commit_match = re.search(allura_pattern, url) | ||
| if commit_match: | ||
| return PackageURL( | ||
| type="generic", |
There was a problem hiding this comment.
We may have a sourceforge type? Or this is for a git type
pombredanne
left a comment
There was a problem hiding this comment.
Looking great ... we need some PURL type refinements.
Currently, many fix-commit URLs are not being converted to PURLs during collection. It would be great to add support for these URLs to ensure accurate url2purl and purl2url conversions.
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: