From 600d43db0c6c19fafa2f5f313170f31cc82acb9c Mon Sep 17 00:00:00 2001 From: James Moger Date: Fri, 26 Sep 2014 09:06:29 -0400 Subject: [PATCH] Respect repository default integration branch for new proposal tickets --- src/main/java/com/gitblit/git/PatchsetReceivePack.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/gitblit/git/PatchsetReceivePack.java b/src/main/java/com/gitblit/git/PatchsetReceivePack.java index d9404cb4..54ffb7ba 100644 --- a/src/main/java/com/gitblit/git/PatchsetReceivePack.java +++ b/src/main/java/com/gitblit/git/PatchsetReceivePack.java @@ -151,6 +151,11 @@ public class PatchsetReceivePack extends GitblitReceivePack { LOGGER.error("failed to determine default branch for " + repository.name, e); } + if (!StringUtils.isEmpty(getRepositoryModel().mergeTo)) { + // repository settings specifies a default integration branch + defaultBranch = Repository.shortenRefName(getRepositoryModel().mergeTo); + } + long ticketId = 0L; try { ticketId = Long.parseLong(branch); -- 2.39.5