diff --git a/pom.xml b/pom.xml
index e448cf9..45b7827 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,7 @@
2.24.1
2.4.0
- 3.9.5
+ 3.9.6
diff --git a/src/main/java/io/quarkus/bot/action/buildreporter/BuildReporterAction.java b/src/main/java/io/quarkus/bot/action/buildreporter/BuildReporterAction.java
index db1ecde..8f6a7fb 100644
--- a/src/main/java/io/quarkus/bot/action/buildreporter/BuildReporterAction.java
+++ b/src/main/java/io/quarkus/bot/action/buildreporter/BuildReporterAction.java
@@ -17,7 +17,6 @@
import io.quarkiverse.githubaction.Commands;
import io.quarkiverse.githubaction.Context;
import io.quarkiverse.githubaction.Inputs;
-import io.quarkus.bot.action.buildreporter.workflow.QuarkusWorkflowConstants;
import io.quarkus.bot.buildreporter.githubactions.BuildReporterActionHandler;
import io.quarkus.bot.buildreporter.githubactions.BuildReporterConfig;
@@ -50,10 +49,24 @@ void postJobSummary(Inputs inputs, Commands commands, Context context, GitHub gi
return;
}
+ Comparator workflowJobComparator;
+
+ switch (context.getGitHubRepository()) {
+ case "quarkusio/quarkus":
+ workflowJobComparator = QuarkusWorkflowJobComparator.INSTANCE;
+ break;
+ case "quarkiverse/quarkus-langchain4j":
+ workflowJobComparator = QuarkusLangChain4jWorkflowJobComparator.INSTANCE;
+ break;
+ default:
+ // it will use the default ones
+ workflowJobComparator = null;
+ }
+
BuildReporterConfig buildReporterConfig = new BuildReporterConfig.Builder()
// only create check run and annotation if this is a fork
.createCheckRun(workflowRun.getRepository().isFork())
- .workflowJobComparator(QuarkusWorkflowJobComparator.INSTANCE)
+ .workflowJobComparator(workflowJobComparator)
.build();
Optional report = buildReporterActionHandler.generateReport(context.getGitHubWorkflow(), workflowRun,
@@ -72,16 +85,101 @@ private final static class QuarkusWorkflowJobComparator implements Comparator {
+
+ private static final QuarkusLangChain4jWorkflowJobComparator INSTANCE = new QuarkusLangChain4jWorkflowJobComparator();
+
+ @Override
+ public int compare(GHWorkflowJob o1, GHWorkflowJob o2) {
+ int order1 = getOrder(o1.getName());
+ int order2 = getOrder(o2.getName());
+
+ if (order1 == order2) {
+ return o1.getName().compareToIgnoreCase(o2.getName());
+ }
+
+ return order1 - order2;
+ }
+
+ private static int getOrder(String jobName) {
+ if (jobName.startsWith("Quick Build")) {
+ return 1;
+ }
+ if (jobName.startsWith("JVM tests - ")) {
+ return 2;
+ }
+ if (jobName.startsWith("Native tests - ")) {
+ return 12;
+ }
+ if (jobName.startsWith("In process embedding model tests - ")) {
+ return 22;
+ }
- return o1.getName().compareTo(o2.getName());
+ return 200;
}
}
}
diff --git a/src/main/java/io/quarkus/bot/action/buildreporter/workflow/QuarkusWorkflowConstants.java b/src/main/java/io/quarkus/bot/action/buildreporter/workflow/QuarkusWorkflowConstants.java
index f2804be..76b4097 100644
--- a/src/main/java/io/quarkus/bot/action/buildreporter/workflow/QuarkusWorkflowConstants.java
+++ b/src/main/java/io/quarkus/bot/action/buildreporter/workflow/QuarkusWorkflowConstants.java
@@ -8,6 +8,7 @@ public class QuarkusWorkflowConstants {
public static final String JOB_NAME_INITIAL_JDK_PREFIX = "Initial JDK ";
public static final String JOB_NAME_JVM_TESTS_PREFIX = "JVM Tests";
public static final String JOB_NAME_JDK_PREFIX = "JDK";
+ public static final String JOB_NAME_JAVA_PREFIX = "Java";
public static final String JOB_NAME_WINDOWS = "Windows";
public static final String JOB_NAME_BUILD_REPORT = "Build report";
}
diff --git a/src/main/java/io/quarkus/bot/action/buildreporter/workflow/QuarkusWorkflowJobLabeller.java b/src/main/java/io/quarkus/bot/action/buildreporter/workflow/QuarkusWorkflowJobLabeller.java
index f61e44e..e3e1935 100644
--- a/src/main/java/io/quarkus/bot/action/buildreporter/workflow/QuarkusWorkflowJobLabeller.java
+++ b/src/main/java/io/quarkus/bot/action/buildreporter/workflow/QuarkusWorkflowJobLabeller.java
@@ -17,7 +17,8 @@ public String label(String name) {
String[] tokens = name.split(QuarkusWorkflowConstants.JOB_NAME_DELIMITER);
for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].startsWith(QuarkusWorkflowConstants.JOB_NAME_JDK_PREFIX)) {
+ if (tokens[i].startsWith(QuarkusWorkflowConstants.JOB_NAME_JDK_PREFIX)
+ || tokens[i].startsWith(QuarkusWorkflowConstants.JOB_NAME_JAVA_PREFIX)) {
break;
}
diff --git a/src/main/java/io/quarkus/bot/action/buildreporter/workflow/report/QuarkusWorkflowReportJobIncludeStrategy.java b/src/main/java/io/quarkus/bot/action/buildreporter/workflow/report/QuarkusWorkflowReportJobIncludeStrategy.java
index 368ad88..36f035d 100644
--- a/src/main/java/io/quarkus/bot/action/buildreporter/workflow/report/QuarkusWorkflowReportJobIncludeStrategy.java
+++ b/src/main/java/io/quarkus/bot/action/buildreporter/workflow/report/QuarkusWorkflowReportJobIncludeStrategy.java
@@ -1,5 +1,7 @@
package io.quarkus.bot.action.buildreporter.workflow.report;
+import java.util.Locale;
+
import jakarta.inject.Singleton;
import io.quarkus.bot.action.buildreporter.workflow.QuarkusWorkflowConstants;
@@ -38,7 +40,8 @@ public boolean include(WorkflowReport report, WorkflowReportJob job) {
}
private static boolean isJvmTests(WorkflowReportJob job) {
- return job.getName().startsWith(QuarkusWorkflowConstants.JOB_NAME_JVM_TESTS_PREFIX);
+ return job.getName().toLowerCase(Locale.ROOT)
+ .startsWith(QuarkusWorkflowConstants.JOB_NAME_JVM_TESTS_PREFIX.toLowerCase(Locale.ROOT));
}
private static boolean isWindows(WorkflowReportJob job) {