From fdf33090843bfcf0d5c4bd1ca9088752164532a2 Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Wed, 10 Apr 2024 14:02:21 +0300 Subject: [PATCH] [CI] Handle canceled or timed out, etc. steps in issue updater Assume any step that didn't succeed or was not skipped as a failed one. Closes https://github.com/graalvm/mandrel/issues/709 --- .github/quarkus-ecosystem-issue.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/quarkus-ecosystem-issue.java b/.github/quarkus-ecosystem-issue.java index f48e7e273570..44575dc2ca10 100644 --- a/.github/quarkus-ecosystem-issue.java +++ b/.github/quarkus-ecosystem-issue.java @@ -310,7 +310,9 @@ private void processSyncJobs(GHIssue issue, GHWorkflowJob job) { private void processFailedJob(StringBuilder sb, GHWorkflowJob job) { sb.append(String.format("* [%s](%s)\n", job.getName(), job.getHtmlUrl())); - GHWorkflowJob.Step step = job.getSteps().stream().filter(s -> s.getConclusion().equals(Conclusion.FAILURE)).findFirst().get(); + GHWorkflowJob.Step step = job.getSteps().stream() + .filter(s -> !(s.getConclusion().equals(Conclusion.SUCCESS) || s.getConclusion().equals(Conclusion.SKIPPED))) + .findFirst().get(); sb.append(String.format(" * Step: %s\n", step.getName())); String fullContent = getJobsLogs(job, "FAILURE [", "Z Error:"); if (!fullContent.isEmpty()) {