From b335dda6b2a2254e2d4c3162ea945496d9a0eb58 Mon Sep 17 00:00:00 2001 From: James Moger Date: Sat, 8 Mar 2014 11:53:38 -0500 Subject: Fix integration branch in propose instructions --- src/main/java/com/gitblit/wicket/pages/TicketPage.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/com/gitblit/wicket/pages/TicketPage.java b/src/main/java/com/gitblit/wicket/pages/TicketPage.java index 1c0544c8..d3ddc89f 100644 --- a/src/main/java/com/gitblit/wicket/pages/TicketPage.java +++ b/src/main/java/com/gitblit/wicket/pages/TicketPage.java @@ -988,7 +988,11 @@ public class TicketPage extends TicketBasePage { md = md.replace("${ticketId}", "" + ticketId); md = md.replace("${patchset}", "" + 1); md = md.replace("${reviewBranch}", Repository.shortenRefName(PatchsetCommand.getTicketBranch(ticketId))); - md = md.replace("${integrationBranch}", Repository.shortenRefName(getRepositoryModel().HEAD)); + String integrationBranch = Repository.shortenRefName(getRepositoryModel().HEAD); + if (!StringUtils.isEmpty(ticket.mergeTo)) { + integrationBranch = ticket.mergeTo; + } + md = md.replace("${integrationBranch}", integrationBranch); return MarkdownUtils.transformMarkdown(md); } -- cgit v1.2.3