summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/git
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-03-28 19:58:48 -0400
committerJames Moger <james.moger@gitblit.com>2014-03-28 20:06:00 -0400
commitee4ef4efef65c834f722381c012928df602ceff3 (patch)
treeaa726e121b170c7975151e94572cae6ce4229e30 /src/main/java/com/gitblit/git
parent53a83f67aef203379e43a9ed89ccfcb16c16200e (diff)
downloadgitblit-ee4ef4efef65c834f722381c012928df602ceff3.tar.gz
gitblit-ee4ef4efef65c834f722381c012928df602ceff3.zip
Fix close ticket on push by commit message parsing (issue-404)
Diffstat (limited to 'src/main/java/com/gitblit/git')
-rw-r--r--src/main/java/com/gitblit/git/PatchsetReceivePack.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/git/PatchsetReceivePack.java b/src/main/java/com/gitblit/git/PatchsetReceivePack.java
index 3ec3086a..1d3312aa 100644
--- a/src/main/java/com/gitblit/git/PatchsetReceivePack.java
+++ b/src/main/java/com/gitblit/git/PatchsetReceivePack.java
@@ -775,6 +775,9 @@ public class PatchsetReceivePack extends GitblitReceivePack {
}
TicketModel ticket = ticketService.getTicket(repository, ticketNumber);
+ if (ticket == null) {
+ continue;
+ }
String integrationBranch;
if (StringUtils.isEmpty(ticket.mergeTo)) {
// unspecified integration branch
@@ -897,7 +900,7 @@ public class PatchsetReceivePack extends GitblitReceivePack {
Pattern p = Pattern.compile("(?:fixes|closes)[\\s-]+#?(\\d+)", Pattern.CASE_INSENSITIVE);
Matcher m = p.matcher(commit.getFullMessage());
while (m.find()) {
- String val = m.group();
+ String val = m.group(1);
return Long.parseLong(val);
}
}