Beispiel #1
0
 private void ccApprovals(final boolean includeZero) {
   try {
     // CC anyone else who has posted an approval mark on this change
     //
     for (PatchSetApproval ap : args.db.get().patchSetApprovals().byChange(change.getId())) {
       if (!includeZero && ap.getValue() == 0) {
         continue;
       }
       add(RecipientType.CC, ap.getAccountId());
     }
   } catch (OrmException err) {
   }
 }
Beispiel #2
0
  /** Format the message body by calling {@link #appendText(String)}. */
  protected void format() throws EmailException {
    formatChange();
    appendText(velocifyFile("ChangeFooter.vm"));
    try {
      HashSet<Account.Id> reviewers = new HashSet<Account.Id>();
      for (PatchSetApproval p : args.db.get().patchSetApprovals().byChange(change.getId())) {
        reviewers.add(p.getAccountId());
      }

      TreeSet<String> names = new TreeSet<String>();
      for (Account.Id who : reviewers) {
        names.add(getNameEmailFor(who));
      }

      for (String name : names) {
        appendText("Gerrit-Reviewer: " + name + "\n");
      }
    } catch (OrmException e) {
    }
  }