]> source.dussan.org Git - gitblit.git/commitdiff
Fix integration branch in propose instructions
authorJames Moger <james.moger@gitblit.com>
Sat, 8 Mar 2014 16:53:38 +0000 (11:53 -0500)
committerJames Moger <james.moger@gitblit.com>
Sat, 8 Mar 2014 16:53:38 +0000 (11:53 -0500)
src/main/java/com/gitblit/wicket/pages/TicketPage.java

index 1c0544c8fad75e8ec27b74325b4091cc4c3438be..d3ddc89f0acb0f896bbc1fd77bf9e3e162cc1bf8 100644 (file)
@@ -988,7 +988,11 @@ public class TicketPage extends TicketBasePage {
                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