Bukama commented on code in PR #194:
URL: https://github.com/apache/maven-dist-tool/pull/194#discussion_r3608883153


##########
src/main/java/org/apache/maven/dist/tools/jobs/master/ListMasterJobsReport.java:
##########
@@ -224,4 +224,58 @@ private ZonedDateTime getLastBuild(String lastSuccess, 
String lastFailure) {
             return failure;
         }
     }
+
+    private String getLocalBadge(String status) {
+        return switch (status) {
+            case "FAILURE" -> prepareBadge("failure", "#dd4343");
+            case "SUCCESS" -> prepareBadge("passing", "#4b0");
+            case "UNKNOWN" -> prepareBadge("unknown", "#57606a");
+            case "UNSTABLE" -> prepareBadge("unstable", "#ffff00");
+            default -> prepareBadge("unknown", "#57606a");
+        };
+    }
+
+    private String prepareBadge(String buildStatus, String color) {
+        // Replace with text-block, when maven-plugin-plugin supports needed 
Java version
+        String badge =
+                "<svg xmlns=\"http://www.w3.org/2000/svg\"; width=\"98\" 
height=\"20\" role=\"img\" aria-label=\"checks: VAR_STATUS\">"

Review Comment:
   For my understanding, this is only definition to use the W3C SVG 
namespace/definition to render the SVG



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to