< prev index next > bots/mlbridge/src/main/java/org/openjdk/skara/bots/mlbridge/ReviewArchive.java
Print this page
} else if (censusInstance.project().isCommitter(contributor.username(), version)) {
return "Committer";
} else if (censusInstance.project().isAuthor(contributor.username(), version)) {
return "Author";
}
! return "none";
}
void addReview(Review review) {
var id = getMessageId(review);
if (existingIds.containsKey(getStableMessageId(id))) {
} else if (censusInstance.project().isCommitter(contributor.username(), version)) {
return "Committer";
} else if (censusInstance.project().isAuthor(contributor.username(), version)) {
return "Author";
}
! return "no project role";
}
void addReview(Review review) {
var id = getMessageId(review);
if (existingIds.containsKey(getStableMessageId(id))) {
if (review.verdict() == Review.Verdict.APPROVED && isReviewer) {
approvalIds.add(id);
}
var userName = contributor != null ? contributor.username() : review.reviewer().userName() + "@" + censusInstance.namespace().name();
! var userRole = contributor != null ? projectRole(contributor) : "no project role";
var replyBody = ArchiveMessages.reviewVerdictBody(review.body().orElse(""), review.verdict(), userName, userRole);
addReplyCommon(parent, review.reviewer(), subject, replyBody, id);
}
if (review.verdict() == Review.Verdict.APPROVED && isReviewer) {
approvalIds.add(id);
}
var userName = contributor != null ? contributor.username() : review.reviewer().userName() + "@" + censusInstance.namespace().name();
! var userRole = contributor != null ? projectRole(contributor) : "no OpenJDK username";
var replyBody = ArchiveMessages.reviewVerdictBody(review.body().orElse(""), review.verdict(), userName, userRole);
addReplyCommon(parent, review.reviewer(), subject, replyBody, id);
}
< prev index next >