DependencyTrack / dependency-track

Dependency-Track is an intelligent Component Analysis platform that allows organizations to identify and reduce risk in the software supply chain.
https://dependencytrack.org/
Apache License 2.0
2.45k stars 532 forks source link

Backport: Fix Slack notifications failing when no base URL is configured #3792

Closed nscuro closed 1 month ago

nscuro commented 1 month ago

Description

Fixes Slack notifications failing when no base URL is configured.

See https://github.com/DependencyTrack/dependency-track/issues/3742#issuecomment-2143465872 for details.

If no base URL is configured, the View Component, View Project, and View Vulnerability buttons will be omitted from the notification. Because they are intended to link back to Dependency-Track, it doesn't make sense to include them without valid URL.

Addressed Issue

Fixes #3742 Backports #3791

Additional Details

N/A

Checklist

codacy-production[bot] commented 1 month ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
:white_check_mark: +0.07% (target: -1.00%) :white_check_mark: (target: 70.00%)
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (8ad00d3ac18f9db7ff446861c1c17a97814695fd) | 22074 | 16780 | 76.02% | | | Head commit (a17d9ea3f10a8a9054251d4af4ba16a08abe9909) | 22074 (+0) | 16795 (+15) | 76.08% (**+0.07%**) | **Coverage variation** is the difference between the coverage for the head and common ancestor commits of the pull request branch: ` - `
Diff coverage details | | Coverable lines | Covered lines | Diff coverage | | ------------- | ------------- | ------------- | ------------- | | Pull request (#3792) | 0 | 0 | **∅ (not applicable)** | **Diff coverage** is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: `/ * 100%`

See your quality gate settings    Change summary preferences

Codacy will stop sending the deprecated coverage status from June 5th, 2024. Learn more