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 graalvm#709
  • Loading branch information
zakkak committed Apr 10, 2024
1 parent 9396895 commit 7245fa2
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 7245fa2

Please sign in to comment.