-
-
Notifications
You must be signed in to change notification settings - Fork 82
URL Heuristics Feature #970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,7 +19,7 @@ | |
| """ | ||
| CycloneDX related helpers and utils. | ||
| """ | ||
|
|
||
| from urllib.parse import urlparse | ||
| from collections.abc import Iterable | ||
| from re import compile as re_compile | ||
| from typing import Any, Optional | ||
|
|
@@ -134,12 +134,52 @@ def licenses_fixup(component: 'Component') -> None: | |
| 'docs': ExternalReferenceType.DOCUMENTATION, | ||
| 'changelog': ExternalReferenceType.RELEASE_NOTES, | ||
| 'changes': ExternalReferenceType.RELEASE_NOTES, | ||
| 'releasenotes': ExternalReferenceType.RELEASE_NOTES, | ||
| 'news': ExternalReferenceType.RELEASE_NOTES, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "news","whatsnew" can be anything, not only release notes - i think this is undesired |
||
| 'whatsnew': ExternalReferenceType.RELEASE_NOTES, | ||
| 'history': ExternalReferenceType.RELEASE_NOTES, | ||
| # 'source': ExternalReferenceType.SOURCE-DISTRIBUTION, | ||
| 'repository': ExternalReferenceType.VCS, | ||
| 'github': ExternalReferenceType.VCS, | ||
| 'chat': ExternalReferenceType.CHAT, | ||
| 'sponsor': ExternalReferenceType.SOCIAL, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "sponsor","donation", "donate" - this is an undesired category mapping to "social". |
||
| 'donation': ExternalReferenceType.SOCIAL, | ||
| 'donate': ExternalReferenceType.SOCIAL | ||
| } | ||
| URL_MAP = { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unused symbol? |
||
| # Hosting | ||
| "github.com": ExternalReferenceType.VCS, | ||
| "gitlab.com": ExternalReferenceType.VCS, | ||
| "bitbucket.org": ExternalReferenceType.VCS, | ||
| # Social | ||
| "discord.gg": ExternalReferenceType.SOCIAL, | ||
| "discord.com": ExternalReferenceType.SOCIAL, | ||
| "discordapp.com": ExternalReferenceType.SOCIAL, | ||
| "glitter.im": ExternalReferenceType.SOCIAL, | ||
| "mastodon.com": ExternalReferenceType.SOCIAL, | ||
| "reddit.com": ExternalReferenceType.SOCIAL, | ||
| "slack.com": ExternalReferenceType.SOCIAL, | ||
| "youtube.com": ExternalReferenceType.SOCIAL, | ||
| "youtu.be": ExternalReferenceType.SOCIAL, | ||
| "twitter.com": ExternalReferenceType.SOCIAL, | ||
| "x.com": ExternalReferenceType.SOCIAL, | ||
| # Docs | ||
| "readthedocs.io": ExternalReferenceType.DOCUMENTATION, | ||
| # CI | ||
| "ci.appveyor.com": ExternalReferenceType.QUALITY_METRICS, | ||
| "circleci.com": ExternalReferenceType.QUALITY_METRICS, | ||
| "codecov.io":ExternalReferenceType.QUALITY_METRICS, | ||
| "coveralls.io": ExternalReferenceType.QUALITY_METRICS, | ||
| "travis-ci.com": ExternalReferenceType.QUALITY_METRICS, | ||
| "travis-ci.org": ExternalReferenceType.QUALITY_METRICS, | ||
| # PyPI | ||
| "cheeseshop.python.org": ExternalReferenceType.DISTRIBUTION, | ||
| "pypi.io": ExternalReferenceType.DISTRIBUTION, | ||
| "pypi.org": ExternalReferenceType.DISTRIBUTION, | ||
| "pypi.python.org": ExternalReferenceType.DISTRIBUTION, | ||
| # Python | ||
| "python.org": ExternalReferenceType.WEBSITE, | ||
| } | ||
|
|
||
| _NOCHAR_MATCHER = re_compile('[^a-z]') | ||
|
|
||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.