Skip to content

Commit

Permalink
[CI] Handle canceled or timed out, etc. steps in issue updater
Browse files Browse the repository at this point in the history
Assume any step that didn't succeed or was not skipped as a failed one.

Closes #709
  • Loading branch information
zakkak committed Apr 11, 2024
1 parent d9566d8 commit fdf3309
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/quarkus-ecosystem-issue.java
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit fdf3309

Please sign in to comment.