md = md.replace("${ticketId}", "" + ticketId);\r
md = md.replace("${patchset}", "" + 1);\r
md = md.replace("${reviewBranch}", Repository.shortenRefName(PatchsetCommand.getTicketBranch(ticketId)));\r
- md = md.replace("${integrationBranch}", Repository.shortenRefName(getRepositoryModel().HEAD));\r
+ String integrationBranch = Repository.shortenRefName(getRepositoryModel().HEAD);\r
+ if (!StringUtils.isEmpty(ticket.mergeTo)) {\r
+ integrationBranch = ticket.mergeTo;\r
+ }\r
+ md = md.replace("${integrationBranch}", integrationBranch);\r
return MarkdownUtils.transformMarkdown(md);\r
}\r
\r