Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch exceptions caused by trying to look up issues during jcheck #543

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -337,18 +337,24 @@ private String getStatusMessage(List<Comment> comments, List<Review> reviews, Pu
}
progressBody.append("\n");
for (var currentIssue : allIssues) {
var iss = issueProject.issue(currentIssue.id());
progressBody.append(" * ");
if (iss.isPresent()) {
progressBody.append("[");
progressBody.append(iss.get().id());
progressBody.append("](");
progressBody.append(iss.get().webUrl());
progressBody.append("): ");
progressBody.append(iss.get().title());
progressBody.append("\n");
} else {
progressBody.append("⚠️ Failed to retrieve information on issue `");
try {
var iss = issueProject.issue(currentIssue.id());
if (iss.isPresent()) {
progressBody.append("[");
progressBody.append(iss.get().id());
progressBody.append("](");
progressBody.append(iss.get().webUrl());
progressBody.append("): ");
progressBody.append(iss.get().title());
progressBody.append("\n");
} else {
progressBody.append("⚠️ Failed to retrieve information on issue `");
progressBody.append(currentIssue.id());
progressBody.append("`.\n");
}
} catch (RuntimeException e) {
progressBody.append("⚠️ Temporary failure when trying to retrieve information on issue `");
progressBody.append(currentIssue.id());
progressBody.append("`.\n");
}