| | |
| | | instructions = instructions.replace("${ticketRef}", ticketBranch); |
| | | instructions = instructions.replace("${patchsetRef}", patchsetBranch); |
| | | instructions = instructions.replace("${reviewBranch}", reviewBranch); |
| | | instructions = instructions.replace("${ticketBranch}", ticketBranch); |
| | | |
| | | return instructions; |
| | | } |
| | |
| | | |
| | | // |
| | | // Direct TO recipients |
| | | // reporter & responsible |
| | | // |
| | | Set<String> tos = new TreeSet<String>(); |
| | | tos.add(ticket.createdBy); |
| | | if (!StringUtils.isEmpty(ticket.responsible)) { |
| | | tos.add(ticket.responsible); |
| | | } |
| | | |
| | | Set<String> toAddresses = new TreeSet<String>(); |
| | | for (String name : ticket.getParticipants()) { |
| | | for (String name : tos) { |
| | | UserModel user = userManager.getUserModel(name); |
| | | if (user != null && !user.disabled) { |
| | | if (!StringUtils.isEmpty(user.emailAddress)) { |
| | |
| | | // |
| | | Set<String> ccs = new TreeSet<String>(); |
| | | |
| | | // repository owners |
| | | if (!ArrayUtils.isEmpty(repository.owners)) { |
| | | tos.addAll(repository.owners); |
| | | } |
| | | |
| | | // cc users mentioned in last comment |
| | | Change lastChange = ticket.changes.get(ticket.changes.size() - 1); |
| | | if (lastChange.hasComment()) { |