From eef18933d56c98cad9d2d75d890bc47ee184cb3f Mon Sep 17 00:00:00 2001 From: Kaushik Date: Tue, 21 Apr 2026 13:08:55 +0000 Subject: [PATCH] infer bug_tracking_url and code_view_url from vcs_url Signed-off-by: Kaushik --- src/packagedcode/models.py | 12 ++++ src/packagedcode/utils.py | 58 +++++++++++++++ .../cargo/cargo_toml/clap/Cargo.toml.expected | 4 +- .../cargo_toml/clippy/Cargo.toml.expected | 4 +- .../cargo_toml/mdbook/Cargo.toml.expected | 4 +- .../cargo_toml/rustfmt/Cargo.toml.expected | 4 +- .../cargo_toml/rustup/Cargo.toml.expected | 4 +- .../single-file-scan/Cargo.toml.expected | 6 +- .../cargo/scan-package-only.expected.json | 8 +-- .../data/cargo/scan.expected.json | 16 ++--- .../data/conda/assembly-conda-scan.json | 8 +-- .../meta-yaml/abeona/meta.yaml-expected.json | 4 +- .../gcnvkernel/meta.yaml-expected.json | 4 +- .../golang/gomod/kingpin/output.expected.json | 2 +- .../opencensus-service/output.expected.json | 2 +- .../gomod/participle/output.expected.json | 2 +- .../golang/gomod/sample/output.expected.json | 2 +- .../golang/gomod/uap-go/output.expected.json | 2 +- .../gomod/user_agent/output.expected.json | 2 +- ...google-built-collection-diag.expected.json | 8 +-- .../google-built-collection.expected.json | 8 +-- ...t-collection_without_license.expected.json | 8 +-- ...lection_without_license_text.expected.json | 8 +-- .../fizzler.expected.json | 8 +-- .../maven2/foo-pom/foo-pom.xml.package.json | 2 +- .../assemble/numbers-1.7.4-expected.json | 4 +- ...htrace-core-4.0.0-incubating-expected.json | 12 ++-- ...tle.Core.nuspec-package-only.json.expected | 4 +- .../nuget/Castle.Core.nuspec.json.expected | 4 +- .../data/opam/sample5/output.opam.expected | 2 +- .../data/plugin/cargo-package-expected.json | 8 +-- .../data/plugin/nuget-package-expected.json | 8 +-- .../specs/simple-pubspec.yaml-expected.json | 4 +- .../connexion-pyproject.toml-expected.json | 4 +- .../poetry/gino-pyproject.toml-expected.json | 4 +- .../attrs-pyproject.toml-expected.json | 2 +- .../daglib_wheel_extracted-expected.json | 8 +-- .../haruka_bot-1.2.3.dist-info-expected.json | 4 +- .../beartype-0.19.0.dist-info-expected.json | 2 +- .../narwhals-1.29.0.dist-info-expected.json | 2 +- tests/packagedcode/test_utils.py | 70 +++++++++++++++++++ .../classify/with_package_data.expected.json | 6 +- 42 files changed, 239 insertions(+), 99 deletions(-) diff --git a/src/packagedcode/models.py b/src/packagedcode/models.py index 0c4ffb9e56e..a47bc7024b0 100644 --- a/src/packagedcode/models.py +++ b/src/packagedcode/models.py @@ -768,6 +768,8 @@ def from_data(cls, package_data, package_only=False): else: package_data.normalize_extracted_license_statement() + package_data.infer_vcs_urls() + return package_data @property @@ -857,6 +859,16 @@ def populate_license_fields(self): self.normalize_extracted_license_statement() + def infer_vcs_urls(self): + from packagedcode.utils import parse_vcs_urls + if not self.vcs_url: + return + code_view, bug_track = parse_vcs_urls(self.vcs_url, version=self.version) + if not self.code_view_url and code_view: + self.code_view_url = code_view + if not self.bug_tracking_url and bug_track: + self.bug_tracking_url = bug_track + def update_purl_fields(self, package_data, replace=False): if not self.type == package_data.type: diff --git a/src/packagedcode/utils.py b/src/packagedcode/utils.py index 727792b95ed..8d9acecaaf4 100644 --- a/src/packagedcode/utils.py +++ b/src/packagedcode/utils.py @@ -7,6 +7,8 @@ # See https://aboutcode.org for more information about nexB OSS projects. # +from urllib.parse import urlsplit + from packageurl import PackageURL try: @@ -114,6 +116,62 @@ def normalize_vcs_url(repo_url, vcs_tool=None): return repo_url +BUG_TRACKING_SUFFIXES = { + 'github.com': '/issues', + 'gitlab.com': '/-/issues', + 'codeberg.org': '/issues', + 'bitbucket.org': '/issues', +} + +# each platform has a different path scheme for browsing a tagged tree +CODE_VIEW_SUFFIXES = { + 'github.com': '/tree/{version}', + 'gitlab.com': '/-/tree/{version}', + 'codeberg.org': '/src/tag/{version}', + 'bitbucket.org': '/src/{version}', +} + + +def parse_vcs_urls(vcs_url, version=None): + """ + Given a ``vcs_url`` and an optional ``version``, return a + (code_view_url, bug_tracking_url) tuple for recognized hosting platforms, + or (None, None) otherwise. + + ``code_view_url`` points to the source tree at a specific version tag and + is only populated when a concrete ``version`` is provided. + """ + cleaned = normalize_vcs_url(vcs_url) + if not cleaned: + return None, None + + if cleaned.endswith('.git'): + cleaned = cleaned[:-4] + + # urlsplit can't parse git@ SSH form like git@github.com:owner/repo + if cleaned.startswith('git@'): + cleaned = 'https://' + cleaned[4:].replace(':', '/') + + parsed = urlsplit(cleaned) + host = parsed.netloc.lower() + path = parsed.path.rstrip('/') + base = f'https://{host}{path}' + + bug_suffix = BUG_TRACKING_SUFFIXES.get(host) + if not bug_suffix: + return None, None + + bug_tracking_url = base + bug_suffix + + code_view_url = None + if version: + code_suffix = CODE_VIEW_SUFFIXES.get(host) + if code_suffix: + code_view_url = base + code_suffix.format(version=version) + + return code_view_url, bug_tracking_url + + def build_description(summary, description): """ Return a description string from a summary and description diff --git a/tests/packagedcode/data/cargo/cargo_toml/clap/Cargo.toml.expected b/tests/packagedcode/data/cargo/cargo_toml/clap/Cargo.toml.expected index 79b0a84c7c8..0f0447ee6e2 100644 --- a/tests/packagedcode/data/cargo/cargo_toml/clap/Cargo.toml.expected +++ b/tests/packagedcode/data/cargo/cargo_toml/clap/Cargo.toml.expected @@ -33,8 +33,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/clap-rs/clap/issues", + "code_view_url": "https://github.com/clap-rs/clap/tree/2.32.0", "vcs_url": "https://github.com/clap-rs/clap", "copyright": null, "holder": null, diff --git a/tests/packagedcode/data/cargo/cargo_toml/clippy/Cargo.toml.expected b/tests/packagedcode/data/cargo/cargo_toml/clippy/Cargo.toml.expected index e2566ada19f..e783ab2f23d 100644 --- a/tests/packagedcode/data/cargo/cargo_toml/clippy/Cargo.toml.expected +++ b/tests/packagedcode/data/cargo/cargo_toml/clippy/Cargo.toml.expected @@ -60,8 +60,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/rust-lang/rust-clippy/issues", + "code_view_url": "https://github.com/rust-lang/rust-clippy/tree/0.0.212", "vcs_url": "https://github.com/rust-lang/rust-clippy", "copyright": null, "holder": null, diff --git a/tests/packagedcode/data/cargo/cargo_toml/mdbook/Cargo.toml.expected b/tests/packagedcode/data/cargo/cargo_toml/mdbook/Cargo.toml.expected index f9489676f83..25b62818cd8 100644 --- a/tests/packagedcode/data/cargo/cargo_toml/mdbook/Cargo.toml.expected +++ b/tests/packagedcode/data/cargo/cargo_toml/mdbook/Cargo.toml.expected @@ -45,8 +45,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/rust-lang-nursery/mdBook/issues", + "code_view_url": "https://github.com/rust-lang-nursery/mdBook/tree/0.2.4-alpha.0", "vcs_url": "https://github.com/rust-lang-nursery/mdBook", "copyright": null, "holder": null, diff --git a/tests/packagedcode/data/cargo/cargo_toml/rustfmt/Cargo.toml.expected b/tests/packagedcode/data/cargo/cargo_toml/rustfmt/Cargo.toml.expected index 6b0af2acdec..cb69dd90552 100644 --- a/tests/packagedcode/data/cargo/cargo_toml/rustfmt/Cargo.toml.expected +++ b/tests/packagedcode/data/cargo/cargo_toml/rustfmt/Cargo.toml.expected @@ -35,8 +35,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/rust-lang/rustfmt/issues", + "code_view_url": "https://github.com/rust-lang/rustfmt/tree/1.0.3", "vcs_url": "https://github.com/rust-lang/rustfmt", "copyright": null, "holder": null, diff --git a/tests/packagedcode/data/cargo/cargo_toml/rustup/Cargo.toml.expected b/tests/packagedcode/data/cargo/cargo_toml/rustup/Cargo.toml.expected index 6a60afc8816..7e7d234db84 100644 --- a/tests/packagedcode/data/cargo/cargo_toml/rustup/Cargo.toml.expected +++ b/tests/packagedcode/data/cargo/cargo_toml/rustup/Cargo.toml.expected @@ -31,8 +31,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/rust-lang/rustup.rs/issues", + "code_view_url": "https://github.com/rust-lang/rustup.rs/tree/1.17.0", "vcs_url": "https://github.com/rust-lang/rustup.rs", "copyright": null, "holder": null, diff --git a/tests/packagedcode/data/cargo/cargo_toml/single-file-scan/Cargo.toml.expected b/tests/packagedcode/data/cargo/cargo_toml/single-file-scan/Cargo.toml.expected index ff00223cc82..e2f31be6aad 100644 --- a/tests/packagedcode/data/cargo/cargo_toml/single-file-scan/Cargo.toml.expected +++ b/tests/packagedcode/data/cargo/cargo_toml/single-file-scan/Cargo.toml.expected @@ -37,8 +37,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/cesarb/constant_time_eq/issues", + "code_view_url": "https://github.com/cesarb/constant_time_eq/tree/0.4.2", "vcs_url": "https://github.com/cesarb/constant_time_eq", "copyright": null, "holder": null, @@ -123,4 +123,4 @@ "scan_errors": [] } ] -} +} \ No newline at end of file diff --git a/tests/packagedcode/data/cargo/scan-package-only.expected.json b/tests/packagedcode/data/cargo/scan-package-only.expected.json index cf50333a6c1..69bc9b09d28 100644 --- a/tests/packagedcode/data/cargo/scan-package-only.expected.json +++ b/tests/packagedcode/data/cargo/scan-package-only.expected.json @@ -327,8 +327,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/indygreg/PyOxidizer/issues", + "code_view_url": "https://github.com/indygreg/PyOxidizer/tree/0.4.0-pre", "vcs_url": "https://github.com/indygreg/PyOxidizer.git", "copyright": null, "holder": null, @@ -669,8 +669,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/daac-tools/daachorse/issues", + "code_view_url": "https://github.com/daac-tools/daachorse/tree/0.4.1", "vcs_url": "https://github.com/daac-tools/daachorse", "copyright": null, "holder": null, diff --git a/tests/packagedcode/data/cargo/scan.expected.json b/tests/packagedcode/data/cargo/scan.expected.json index 480b60afef1..4d1d3e04980 100644 --- a/tests/packagedcode/data/cargo/scan.expected.json +++ b/tests/packagedcode/data/cargo/scan.expected.json @@ -30,8 +30,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/indygreg/PyOxidizer/issues", + "code_view_url": "https://github.com/indygreg/PyOxidizer/tree/0.4.0-pre", "vcs_url": "https://github.com/indygreg/PyOxidizer.git", "copyright": null, "holder": null, @@ -128,8 +128,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/daac-tools/daachorse/issues", + "code_view_url": "https://github.com/daac-tools/daachorse/tree/0.4.1", "vcs_url": "https://github.com/daac-tools/daachorse", "copyright": null, "holder": null, @@ -1173,8 +1173,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/indygreg/PyOxidizer/issues", + "code_view_url": "https://github.com/indygreg/PyOxidizer/tree/0.4.0-pre", "vcs_url": "https://github.com/indygreg/PyOxidizer.git", "copyright": null, "holder": null, @@ -1540,8 +1540,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/daac-tools/daachorse/issues", + "code_view_url": "https://github.com/daac-tools/daachorse/tree/0.4.1", "vcs_url": "https://github.com/daac-tools/daachorse", "copyright": null, "holder": null, diff --git a/tests/packagedcode/data/conda/assembly-conda-scan.json b/tests/packagedcode/data/conda/assembly-conda-scan.json index 0fdf72318fa..86c51c85b8f 100644 --- a/tests/packagedcode/data/conda/assembly-conda-scan.json +++ b/tests/packagedcode/data/conda/assembly-conda-scan.json @@ -19,8 +19,8 @@ "md5": "8cc2fc3e2198c2efe6cd890a7684a16a", "sha256": "940b9ae3f0b64e7ee51dfbdcfcffc674a447e5592f8a66d8064cd505fc122b78", "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/psf/requests/issues", + "code_view_url": "https://github.com/psf/requests/tree/2.32.3", "vcs_url": "https://github.com/psf/requests", "copyright": null, "holder": null, @@ -587,8 +587,8 @@ "md5": null, "sha256": "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760", "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/psf/requests/issues", + "code_view_url": "https://github.com/psf/requests/tree/2.32.3", "vcs_url": "https://github.com/psf/requests", "copyright": null, "holder": null, diff --git a/tests/packagedcode/data/conda/meta-yaml/abeona/meta.yaml-expected.json b/tests/packagedcode/data/conda/meta-yaml/abeona/meta.yaml-expected.json index 8604df717b8..548551ef341 100644 --- a/tests/packagedcode/data/conda/meta-yaml/abeona/meta.yaml-expected.json +++ b/tests/packagedcode/data/conda/meta-yaml/abeona/meta.yaml-expected.json @@ -18,8 +18,8 @@ "md5": null, "sha256": "bc7512f2eef785b037d836f4cc6faded457ac277f75c6e34eccd12da7c85258f", "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/winni2k/abeona/issues", + "code_view_url": "https://github.com/winni2k/abeona/tree/0.45.0", "vcs_url": "https://github.com/winni2k/abeona", "copyright": null, "holder": null, diff --git a/tests/packagedcode/data/conda/meta-yaml/gcnvkernel/meta.yaml-expected.json b/tests/packagedcode/data/conda/meta-yaml/gcnvkernel/meta.yaml-expected.json index e5b7b4a76e0..07d77b3b62b 100644 --- a/tests/packagedcode/data/conda/meta-yaml/gcnvkernel/meta.yaml-expected.json +++ b/tests/packagedcode/data/conda/meta-yaml/gcnvkernel/meta.yaml-expected.json @@ -18,8 +18,8 @@ "md5": null, "sha256": "ac7015c3f0ef1852745ca0ef647adbf8ddef5db63ab485b00bc1ffe654814155", "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/broadinstitute/gatk/issues", + "code_view_url": "https://github.com/broadinstitute/gatk/tree/0.9", "vcs_url": "https://github.com/broadinstitute/gatk", "copyright": null, "holder": null, diff --git a/tests/packagedcode/data/golang/gomod/kingpin/output.expected.json b/tests/packagedcode/data/golang/gomod/kingpin/output.expected.json index 656ba79d622..49ef994a5df 100644 --- a/tests/packagedcode/data/golang/gomod/kingpin/output.expected.json +++ b/tests/packagedcode/data/golang/gomod/kingpin/output.expected.json @@ -18,7 +18,7 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, + "bug_tracking_url": "https://github.com/alecthomas/kingpin/issues", "code_view_url": null, "vcs_url": "https://github.com/alecthomas/kingpin.git", "copyright": null, diff --git a/tests/packagedcode/data/golang/gomod/opencensus-service/output.expected.json b/tests/packagedcode/data/golang/gomod/opencensus-service/output.expected.json index df05ab713ce..64ae70ca1b0 100644 --- a/tests/packagedcode/data/golang/gomod/opencensus-service/output.expected.json +++ b/tests/packagedcode/data/golang/gomod/opencensus-service/output.expected.json @@ -18,7 +18,7 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, + "bug_tracking_url": "https://github.com/census-instrumentation/opencensus-service/issues", "code_view_url": null, "vcs_url": "https://github.com/census-instrumentation/opencensus-service.git", "copyright": null, diff --git a/tests/packagedcode/data/golang/gomod/participle/output.expected.json b/tests/packagedcode/data/golang/gomod/participle/output.expected.json index ab2a17feca8..1d690faf13e 100644 --- a/tests/packagedcode/data/golang/gomod/participle/output.expected.json +++ b/tests/packagedcode/data/golang/gomod/participle/output.expected.json @@ -18,7 +18,7 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, + "bug_tracking_url": "https://github.com/alecthomas/participle/issues", "code_view_url": null, "vcs_url": "https://github.com/alecthomas/participle.git", "copyright": null, diff --git a/tests/packagedcode/data/golang/gomod/sample/output.expected.json b/tests/packagedcode/data/golang/gomod/sample/output.expected.json index a6348340df5..1c21fea535d 100644 --- a/tests/packagedcode/data/golang/gomod/sample/output.expected.json +++ b/tests/packagedcode/data/golang/gomod/sample/output.expected.json @@ -18,7 +18,7 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, + "bug_tracking_url": "https://github.com/alecthomas/sample/issues", "code_view_url": null, "vcs_url": "https://github.com/alecthomas/sample.git", "copyright": null, diff --git a/tests/packagedcode/data/golang/gomod/uap-go/output.expected.json b/tests/packagedcode/data/golang/gomod/uap-go/output.expected.json index 77b89adb54d..27ff07035fc 100644 --- a/tests/packagedcode/data/golang/gomod/uap-go/output.expected.json +++ b/tests/packagedcode/data/golang/gomod/uap-go/output.expected.json @@ -18,7 +18,7 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, + "bug_tracking_url": "https://github.com/ua-parser/uap-go/issues", "code_view_url": null, "vcs_url": "https://github.com/ua-parser/uap-go.git", "copyright": null, diff --git a/tests/packagedcode/data/golang/gomod/user_agent/output.expected.json b/tests/packagedcode/data/golang/gomod/user_agent/output.expected.json index 408fad06d37..29f7b6a49bd 100644 --- a/tests/packagedcode/data/golang/gomod/user_agent/output.expected.json +++ b/tests/packagedcode/data/golang/gomod/user_agent/output.expected.json @@ -18,7 +18,7 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, + "bug_tracking_url": "https://github.com/mssola/user_agent/issues", "code_view_url": null, "vcs_url": "https://github.com/mssola/user_agent.git", "copyright": null, diff --git a/tests/packagedcode/data/license_detection/license-beside-manifest/google-built-collection-diag.expected.json b/tests/packagedcode/data/license_detection/license-beside-manifest/google-built-collection-diag.expected.json index 7ff4e9c399e..61e461590d8 100644 --- a/tests/packagedcode/data/license_detection/license-beside-manifest/google-built-collection-diag.expected.json +++ b/tests/packagedcode/data/license_detection/license-beside-manifest/google-built-collection-diag.expected.json @@ -19,8 +19,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/google/built_collection.dart/issues", + "code_view_url": "https://github.com/google/built_collection.dart/tree/5.1.1", "vcs_url": "https://github.com/google/built_collection.dart", "copyright": null, "holder": null, @@ -209,8 +209,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/google/built_collection.dart/issues", + "code_view_url": "https://github.com/google/built_collection.dart/tree/5.1.1", "vcs_url": "https://github.com/google/built_collection.dart", "copyright": null, "holder": null, diff --git a/tests/packagedcode/data/license_detection/license-beside-manifest/google-built-collection.expected.json b/tests/packagedcode/data/license_detection/license-beside-manifest/google-built-collection.expected.json index b66c524d516..09c3481d7ae 100644 --- a/tests/packagedcode/data/license_detection/license-beside-manifest/google-built-collection.expected.json +++ b/tests/packagedcode/data/license_detection/license-beside-manifest/google-built-collection.expected.json @@ -19,8 +19,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/google/built_collection.dart/issues", + "code_view_url": "https://github.com/google/built_collection.dart/tree/5.1.1", "vcs_url": "https://github.com/google/built_collection.dart", "copyright": null, "holder": null, @@ -203,8 +203,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/google/built_collection.dart/issues", + "code_view_url": "https://github.com/google/built_collection.dart/tree/5.1.1", "vcs_url": "https://github.com/google/built_collection.dart", "copyright": null, "holder": null, diff --git a/tests/packagedcode/data/license_detection/license-beside-manifest/google-built-collection_without_license.expected.json b/tests/packagedcode/data/license_detection/license-beside-manifest/google-built-collection_without_license.expected.json index e6d393cf089..413ecff0b22 100644 --- a/tests/packagedcode/data/license_detection/license-beside-manifest/google-built-collection_without_license.expected.json +++ b/tests/packagedcode/data/license_detection/license-beside-manifest/google-built-collection_without_license.expected.json @@ -19,8 +19,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/google/built_collection.dart/issues", + "code_view_url": "https://github.com/google/built_collection.dart/tree/5.1.1", "vcs_url": "https://github.com/google/built_collection.dart", "copyright": null, "holder": null, @@ -127,8 +127,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/google/built_collection.dart/issues", + "code_view_url": "https://github.com/google/built_collection.dart/tree/5.1.1", "vcs_url": "https://github.com/google/built_collection.dart", "copyright": null, "holder": null, diff --git a/tests/packagedcode/data/license_detection/license-beside-manifest/google-built-collection_without_license_text.expected.json b/tests/packagedcode/data/license_detection/license-beside-manifest/google-built-collection_without_license_text.expected.json index b55d166de91..4052d7e8104 100644 --- a/tests/packagedcode/data/license_detection/license-beside-manifest/google-built-collection_without_license_text.expected.json +++ b/tests/packagedcode/data/license_detection/license-beside-manifest/google-built-collection_without_license_text.expected.json @@ -19,8 +19,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/google/built_collection.dart/issues", + "code_view_url": "https://github.com/google/built_collection.dart/tree/5.1.1", "vcs_url": "https://github.com/google/built_collection.dart", "copyright": null, "holder": null, @@ -200,8 +200,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/google/built_collection.dart/issues", + "code_view_url": "https://github.com/google/built_collection.dart/tree/5.1.1", "vcs_url": "https://github.com/google/built_collection.dart", "copyright": null, "holder": null, diff --git a/tests/packagedcode/data/license_detection/reference-at-manifest/fizzler.expected.json b/tests/packagedcode/data/license_detection/reference-at-manifest/fizzler.expected.json index e3cfae03ae4..46e2a2464bd 100644 --- a/tests/packagedcode/data/license_detection/reference-at-manifest/fizzler.expected.json +++ b/tests/packagedcode/data/license_detection/reference-at-manifest/fizzler.expected.json @@ -27,8 +27,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/atifaziz/Fizzler/issues", + "code_view_url": "https://github.com/atifaziz/Fizzler/tree/1.3.0", "vcs_url": "Git+https://github.com/atifaziz/Fizzler", "copyright": "Copyright \u00a9 2009 Atif Aziz, Colin Ramsay. All rights reserved. Portions Copyright \u00a9 2008 Novell, Inc.", "holder": "Atif Aziz, Colin Ramsay\nNovell, Inc.", @@ -398,8 +398,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/atifaziz/Fizzler/issues", + "code_view_url": "https://github.com/atifaziz/Fizzler/tree/1.3.0", "vcs_url": "Git+https://github.com/atifaziz/Fizzler", "copyright": "Copyright \u00a9 2009 Atif Aziz, Colin Ramsay. All rights reserved. Portions Copyright \u00a9 2008 Novell, Inc.", "holder": "Atif Aziz, Colin Ramsay\nNovell, Inc.", diff --git a/tests/packagedcode/data/maven2/foo-pom/foo-pom.xml.package.json b/tests/packagedcode/data/maven2/foo-pom/foo-pom.xml.package.json index 4735203fa96..b6c1a537c55 100644 --- a/tests/packagedcode/data/maven2/foo-pom/foo-pom.xml.package.json +++ b/tests/packagedcode/data/maven2/foo-pom/foo-pom.xml.package.json @@ -25,7 +25,7 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, + "bug_tracking_url": "https://github.com/jode/baz-bar-parent/issues", "code_view_url": "https://github.com/jode/baz-bar-parent/tree/master", "vcs_url": "git://github.com/jode/baz-bar-parent.git", "copyright": null, diff --git a/tests/packagedcode/data/maven_misc/assemble/numbers-1.7.4-expected.json b/tests/packagedcode/data/maven_misc/assemble/numbers-1.7.4-expected.json index cf3b4e73668..149c99e8569 100644 --- a/tests/packagedcode/data/maven_misc/assemble/numbers-1.7.4-expected.json +++ b/tests/packagedcode/data/maven_misc/assemble/numbers-1.7.4-expected.json @@ -34,7 +34,7 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, + "bug_tracking_url": "https://github.com/peteroupc/Numbers-Java/issues", "code_view_url": "https://github.com/peteroupc/Numbers-Java", "vcs_url": "git+https://github.com/peteroupc/Numbers-Java", "copyright": null, @@ -381,7 +381,7 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, + "bug_tracking_url": "https://github.com/peteroupc/Numbers-Java/issues", "code_view_url": "https://github.com/peteroupc/Numbers-Java", "vcs_url": "git+https://github.com/peteroupc/Numbers-Java", "copyright": null, diff --git a/tests/packagedcode/data/maven_misc/uberjars/htrace-core-4.0.0-incubating-expected.json b/tests/packagedcode/data/maven_misc/uberjars/htrace-core-4.0.0-incubating-expected.json index e8e748a6c6c..ff8be034427 100644 --- a/tests/packagedcode/data/maven_misc/uberjars/htrace-core-4.0.0-incubating-expected.json +++ b/tests/packagedcode/data/maven_misc/uberjars/htrace-core-4.0.0-incubating-expected.json @@ -118,7 +118,7 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, + "bug_tracking_url": "https://github.com/FasterXML/jackson-annotations/issues", "code_view_url": "http://github.com/FasterXML/jackson-annotations", "vcs_url": "git+https://github.com/FasterXML/jackson-annotations.git", "copyright": null, @@ -168,7 +168,7 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, + "bug_tracking_url": "https://github.com/FasterXML/jackson-core/issues", "code_view_url": "http://github.com/FasterXML/jackson-core", "vcs_url": "git+https://github.com/FasterXML/jackson-core.git", "copyright": null, @@ -218,7 +218,7 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, + "bug_tracking_url": "https://github.com/FasterXML/jackson-databind/issues", "code_view_url": "http://github.com/FasterXML/jackson-databind", "vcs_url": "git+https://github.com/FasterXML/jackson-databind.git", "copyright": null, @@ -1101,7 +1101,7 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, + "bug_tracking_url": "https://github.com/FasterXML/jackson-annotations/issues", "code_view_url": "http://github.com/FasterXML/jackson-annotations", "vcs_url": "git+https://github.com/FasterXML/jackson-annotations.git", "copyright": null, @@ -1177,7 +1177,7 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, + "bug_tracking_url": "https://github.com/FasterXML/jackson-core/issues", "code_view_url": "http://github.com/FasterXML/jackson-core", "vcs_url": "git+https://github.com/FasterXML/jackson-core.git", "copyright": null, @@ -1253,7 +1253,7 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, + "bug_tracking_url": "https://github.com/FasterXML/jackson-databind/issues", "code_view_url": "http://github.com/FasterXML/jackson-databind", "vcs_url": "git+https://github.com/FasterXML/jackson-databind.git", "copyright": null, diff --git a/tests/packagedcode/data/nuget/Castle.Core.nuspec-package-only.json.expected b/tests/packagedcode/data/nuget/Castle.Core.nuspec-package-only.json.expected index 23b1b625caa..781cd7f6db7 100644 --- a/tests/packagedcode/data/nuget/Castle.Core.nuspec-package-only.json.expected +++ b/tests/packagedcode/data/nuget/Castle.Core.nuspec-package-only.json.expected @@ -33,8 +33,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/castleproject/Core/issues", + "code_view_url": "https://github.com/castleproject/Core/tree/4.2.1", "vcs_url": "git+https://github.com/castleproject/Core", "copyright": "Copyright (c) 2004-2017 Castle Project - http://www.castleproject.org/", "holder": null, diff --git a/tests/packagedcode/data/nuget/Castle.Core.nuspec.json.expected b/tests/packagedcode/data/nuget/Castle.Core.nuspec.json.expected index 512a0994a35..97009196a4f 100644 --- a/tests/packagedcode/data/nuget/Castle.Core.nuspec.json.expected +++ b/tests/packagedcode/data/nuget/Castle.Core.nuspec.json.expected @@ -33,8 +33,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/castleproject/Core/issues", + "code_view_url": "https://github.com/castleproject/Core/tree/4.2.1", "vcs_url": "git+https://github.com/castleproject/Core", "copyright": "Copyright (c) 2004-2017 Castle Project - http://www.castleproject.org/", "holder": "Castle Project", diff --git a/tests/packagedcode/data/opam/sample5/output.opam.expected b/tests/packagedcode/data/opam/sample5/output.opam.expected index 23599cbd74c..dfa84502c6a 100644 --- a/tests/packagedcode/data/opam/sample5/output.opam.expected +++ b/tests/packagedcode/data/opam/sample5/output.opam.expected @@ -34,7 +34,7 @@ "sha256": null, "sha512": null, "bug_tracking_url": "https://github.com/BinaryAnalysisPlatform/bap/issues", - "code_view_url": null, + "code_view_url": "https://github.com/BinaryAnalysisPlatform/bap/tree/1.0.0", "vcs_url": "git://github.com/BinaryAnalysisPlatform/bap/", "copyright": null, "holder": null, diff --git a/tests/packagedcode/data/plugin/cargo-package-expected.json b/tests/packagedcode/data/plugin/cargo-package-expected.json index f2151dcbd94..398584bf0ff 100644 --- a/tests/packagedcode/data/plugin/cargo-package-expected.json +++ b/tests/packagedcode/data/plugin/cargo-package-expected.json @@ -34,8 +34,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/clap-rs/clap/issues", + "code_view_url": "https://github.com/clap-rs/clap/tree/2.32.0", "vcs_url": "https://github.com/clap-rs/clap", "copyright": null, "holder": null, @@ -322,8 +322,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/clap-rs/clap/issues", + "code_view_url": "https://github.com/clap-rs/clap/tree/2.32.0", "vcs_url": "https://github.com/clap-rs/clap", "copyright": null, "holder": null, diff --git a/tests/packagedcode/data/plugin/nuget-package-expected.json b/tests/packagedcode/data/plugin/nuget-package-expected.json index f33d39a3cfc..a8b0fc076ac 100644 --- a/tests/packagedcode/data/plugin/nuget-package-expected.json +++ b/tests/packagedcode/data/plugin/nuget-package-expected.json @@ -34,8 +34,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/castleproject/Core/issues", + "code_view_url": "https://github.com/castleproject/Core/tree/4.2.1", "vcs_url": "git+https://github.com/castleproject/Core", "copyright": "Copyright (c) 2004-2017 Castle Project - http://www.castleproject.org/", "holder": "Castle Project", @@ -308,8 +308,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/castleproject/Core/issues", + "code_view_url": "https://github.com/castleproject/Core/tree/4.2.1", "vcs_url": "git+https://github.com/castleproject/Core", "copyright": "Copyright (c) 2004-2017 Castle Project - http://www.castleproject.org/", "holder": "Castle Project", diff --git a/tests/packagedcode/data/pubspec/specs/simple-pubspec.yaml-expected.json b/tests/packagedcode/data/pubspec/specs/simple-pubspec.yaml-expected.json index 0cd28ea261f..d8a3fb525aa 100644 --- a/tests/packagedcode/data/pubspec/specs/simple-pubspec.yaml-expected.json +++ b/tests/packagedcode/data/pubspec/specs/simple-pubspec.yaml-expected.json @@ -18,8 +18,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/EPNW/painter/issues", + "code_view_url": "https://github.com/EPNW/painter/tree/2.0.0", "vcs_url": "https://github.com/EPNW/painter", "copyright": null, "holder": null, diff --git a/tests/packagedcode/data/pypi/pyproject-toml/poetry/connexion-pyproject.toml-expected.json b/tests/packagedcode/data/pypi/pyproject-toml/poetry/connexion-pyproject.toml-expected.json index 7730eba5ae1..f89cbe2aff8 100644 --- a/tests/packagedcode/data/pypi/pyproject-toml/poetry/connexion-pyproject.toml-expected.json +++ b/tests/packagedcode/data/pypi/pyproject-toml/poetry/connexion-pyproject.toml-expected.json @@ -90,8 +90,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/spec-first/connexion/issues", + "code_view_url": "https://github.com/spec-first/connexion/tree/3.0.dev0", "vcs_url": "https://github.com/spec-first/connexion", "copyright": null, "holder": null, diff --git a/tests/packagedcode/data/pypi/pyproject-toml/poetry/gino-pyproject.toml-expected.json b/tests/packagedcode/data/pypi/pyproject-toml/poetry/gino-pyproject.toml-expected.json index fc20e73fb04..e68e33d2491 100644 --- a/tests/packagedcode/data/pypi/pyproject-toml/poetry/gino-pyproject.toml-expected.json +++ b/tests/packagedcode/data/pypi/pyproject-toml/poetry/gino-pyproject.toml-expected.json @@ -54,8 +54,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/python-gino/gino/issues", + "code_view_url": "https://github.com/python-gino/gino/tree/1.1.0-rc.1", "vcs_url": "https://github.com/python-gino/gino", "copyright": null, "holder": null, diff --git a/tests/packagedcode/data/pypi/pyproject-toml/standard/attrs-pyproject.toml-expected.json b/tests/packagedcode/data/pypi/pyproject-toml/standard/attrs-pyproject.toml-expected.json index 6531dc33579..ffc651639d4 100644 --- a/tests/packagedcode/data/pypi/pyproject-toml/standard/attrs-pyproject.toml-expected.json +++ b/tests/packagedcode/data/pypi/pyproject-toml/standard/attrs-pyproject.toml-expected.json @@ -41,7 +41,7 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, + "bug_tracking_url": "https://github.com/python-attrs/attrs/issues", "code_view_url": null, "vcs_url": "https://github.com/python-attrs/attrs", "copyright": null, diff --git a/tests/packagedcode/data/pypi/unpacked_wheel/daglib_wheel_extracted-expected.json b/tests/packagedcode/data/pypi/unpacked_wheel/daglib_wheel_extracted-expected.json index cb0ad38bcc4..12b78359060 100644 --- a/tests/packagedcode/data/pypi/unpacked_wheel/daglib_wheel_extracted-expected.json +++ b/tests/packagedcode/data/pypi/unpacked_wheel/daglib_wheel_extracted-expected.json @@ -31,8 +31,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/mharrisb1/daglib/issues", + "code_view_url": "https://github.com/mharrisb1/daglib/tree/0.6.0", "vcs_url": "https://github.com/mharrisb1/daglib", "copyright": null, "holder": null, @@ -236,8 +236,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/mharrisb1/daglib/issues", + "code_view_url": "https://github.com/mharrisb1/daglib/tree/0.6.0", "vcs_url": "https://github.com/mharrisb1/daglib", "copyright": null, "holder": null, diff --git a/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.1/haruka_bot-1.2.3.dist-info-expected.json b/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.1/haruka_bot-1.2.3.dist-info-expected.json index 84fa659f9e8..a248c5bc8db 100644 --- a/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.1/haruka_bot-1.2.3.dist-info-expected.json +++ b/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.1/haruka_bot-1.2.3.dist-info-expected.json @@ -35,8 +35,8 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/SK-415/HarukaBot/tree/master/src/plugins/haruka_bot/issues", + "code_view_url": "https://github.com/SK-415/HarukaBot/tree/master/src/plugins/haruka_bot/tree/1.2.3", "vcs_url": "https://github.com/SK-415/HarukaBot/tree/master/src/plugins/haruka_bot", "copyright": null, "holder": null, diff --git a/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.3/beartype-0.19.0.dist-info-expected.json b/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.3/beartype-0.19.0.dist-info-expected.json index e8eca33049e..8b7181ce489 100644 --- a/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.3/beartype-0.19.0.dist-info-expected.json +++ b/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.3/beartype-0.19.0.dist-info-expected.json @@ -41,7 +41,7 @@ "sha256": null, "sha512": null, "bug_tracking_url": "https://github.com/beartype/beartype/issues", - "code_view_url": null, + "code_view_url": "https://github.com/beartype/beartype/tree/0.19.0", "vcs_url": "https://github.com/beartype/beartype", "copyright": null, "holder": null, diff --git a/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.4/narwhals-1.29.0.dist-info-expected.json b/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.4/narwhals-1.29.0.dist-info-expected.json index f2b162dc34f..c45f64476d3 100644 --- a/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.4/narwhals-1.29.0.dist-info-expected.json +++ b/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.4/narwhals-1.29.0.dist-info-expected.json @@ -39,7 +39,7 @@ "sha256": null, "sha512": null, "bug_tracking_url": "https://github.com/narwhals-dev/narwhals/issues", - "code_view_url": null, + "code_view_url": "https://github.com/narwhals-dev/narwhals/tree/1.29.0", "vcs_url": "https://github.com/narwhals-dev/narwhals", "copyright": null, "holder": null, diff --git a/tests/packagedcode/test_utils.py b/tests/packagedcode/test_utils.py index ea291cf14ac..255a1be7c9d 100644 --- a/tests/packagedcode/test_utils.py +++ b/tests/packagedcode/test_utils.py @@ -10,6 +10,7 @@ from unittest import TestCase from packagedcode.utils import normalize_vcs_url +from packagedcode.utils import parse_vcs_urls class TestPackageUtils(TestCase): @@ -128,3 +129,72 @@ def test_normalize_vcs_url_does_not_fail_on_empty(self): assert normalize_vcs_url(None) == None assert normalize_vcs_url('') == None assert normalize_vcs_url(' ') == None + + # parse_vcs_urls tests -- without version (code_view_url should be None) + + def test_parse_vcs_urls_github_no_version(self): + code, bugs = parse_vcs_urls('https://github.com/owner/repo.git') + assert code is None + assert bugs == 'https://github.com/owner/repo/issues' + + def test_parse_vcs_urls_gitlab_no_version(self): + code, bugs = parse_vcs_urls('git+https://gitlab.com/owner/repo') + assert code is None + assert bugs == 'https://gitlab.com/owner/repo/-/issues' + + def test_parse_vcs_urls_bitbucket_no_version(self): + code, bugs = parse_vcs_urls('git@bitbucket.org:owner/repo') + assert code is None + assert bugs == 'https://bitbucket.org/owner/repo/issues' + + def test_parse_vcs_urls_codeberg_no_version(self): + code, bugs = parse_vcs_urls('https://codeberg.org/owner/repo.git') + assert code is None + assert bugs == 'https://codeberg.org/owner/repo/issues' + + def test_parse_vcs_urls_unknown_host(self): + code, bugs = parse_vcs_urls('https://gitea.example.com/owner/repo.git') + assert code is None + assert bugs is None + + def test_parse_vcs_urls_empty(self): + assert parse_vcs_urls(None) == (None, None) + assert parse_vcs_urls('') == (None, None) + assert parse_vcs_urls(' ') == (None, None) + + # parse_vcs_urls tests -- with version + + def test_parse_vcs_urls_github_git_ssh_with_version(self): + code, bugs = parse_vcs_urls('git@github.com:owner/repo.git', version='1.2.3') + assert code == 'https://github.com/owner/repo/tree/1.2.3' + assert bugs == 'https://github.com/owner/repo/issues' + + def test_parse_vcs_urls_github_https_with_version(self): + code, bugs = parse_vcs_urls('https://github.com/owner/repo.git', version='2.0.0') + assert code == 'https://github.com/owner/repo/tree/2.0.0' + assert bugs == 'https://github.com/owner/repo/issues' + + def test_parse_vcs_urls_github_git_plus_https_with_version(self): + code, bugs = parse_vcs_urls('git+https://github.com/owner/repo.git', version='0.9.1') + assert code == 'https://github.com/owner/repo/tree/0.9.1' + assert bugs == 'https://github.com/owner/repo/issues' + + def test_parse_vcs_urls_gitlab_with_version(self): + code, bugs = parse_vcs_urls('git+https://gitlab.com/owner/repo', version='2.0.0') + assert code == 'https://gitlab.com/owner/repo/-/tree/2.0.0' + assert bugs == 'https://gitlab.com/owner/repo/-/issues' + + def test_parse_vcs_urls_bitbucket_with_version(self): + code, bugs = parse_vcs_urls('git@bitbucket.org:owner/repo', version='3.1.0') + assert code == 'https://bitbucket.org/owner/repo/src/3.1.0' + assert bugs == 'https://bitbucket.org/owner/repo/issues' + + def test_parse_vcs_urls_codeberg_with_version(self): + code, bugs = parse_vcs_urls('https://codeberg.org/owner/repo.git', version='0.5.0') + assert code == 'https://codeberg.org/owner/repo/src/tag/0.5.0' + assert bugs == 'https://codeberg.org/owner/repo/issues' + + def test_parse_vcs_urls_unknown_host_with_version(self): + code, bugs = parse_vcs_urls('https://gitea.example.com/owner/repo.git', version='1.0.0') + assert code is None + assert bugs is None diff --git a/tests/summarycode/data/classify/with_package_data.expected.json b/tests/summarycode/data/classify/with_package_data.expected.json index 5457095ea4c..12153ecc62d 100644 --- a/tests/summarycode/data/classify/with_package_data.expected.json +++ b/tests/summarycode/data/classify/with_package_data.expected.json @@ -19,7 +19,7 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, + "bug_tracking_url": "https://github.com/jboss-logging/jboss-logging/issues", "code_view_url": "https://github.com/jboss-logging/jboss-logging", "vcs_url": "git://github.com/jboss-logging/jboss-logging.git", "copyright": null, @@ -403,7 +403,7 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, + "bug_tracking_url": "https://github.com/jboss-logging/jboss-logging@8d42b4ed170fd961f32663fc4b4816ba4a44d93c/issues", "code_view_url": "https://github.com/jboss-logging/jboss-logging", "vcs_url": "https://github.com/jboss-logging/jboss-logging@8d42b4ed170fd961f32663fc4b4816ba4a44d93c", "copyright": null, @@ -668,7 +668,7 @@ "md5": null, "sha256": null, "sha512": null, - "bug_tracking_url": null, + "bug_tracking_url": "https://github.com/jboss-logging/jboss-logging/issues", "code_view_url": "https://github.com/jboss-logging/jboss-logging", "vcs_url": "git://github.com/jboss-logging/jboss-logging.git", "copyright": null,