diff --git a/src/job-summary.ts b/src/job-summary.ts
index c5dd440..5d82ba5 100644
--- a/src/job-summary.ts
+++ b/src/job-summary.ts
@@ -60,13 +60,10 @@ function writeSummaryTable(results: BuildResult[]): void {
}
function renderOutcome(result: BuildResult): string {
- const badgeUrl = result.buildFailed
- ? 'https://img.shields.io/badge/Build%20Scan%E2%84%A2-FAILED-red?logo=Gradle'
- : 'https://img.shields.io/badge/Build%20Scan%E2%84%A2-SUCCESS-brightgreen?logo=Gradle'
+ const labelPart = result.buildScanUri ? 'Build%20Scan%E2%84%A2' : 'Build'
+ const outcomePart = result.buildFailed ? 'FAILED-red' : 'SUCCESS-brightgreen'
+ const badgeUrl = `https://img.shields.io/badge/${labelPart}-${outcomePart}?logo=Gradle`
const badgeHtml = ``
-
- if (result.buildScanUri) {
- return `${badgeHtml}`
- }
- return badgeHtml
+ const targetUrl = result.buildScanUri ? result.buildScanUri : '#'
+ return `${badgeHtml}`
}