< prev index next >

bots/mlbridge/src/main/java/org/openjdk/skara/bots/mlbridge/ReviewArchive.java

Print this page
*** 317,11 ***
          } 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))) {
--- 317,11 ---
          } 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))) {

*** 354,11 ***
          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);
      }
  
--- 354,11 ---
          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 >