James Moger
2014-03-28 ee4ef4efef65c834f722381c012928df602ceff3
Fix close ticket on push by commit message parsing (issue-404)
2 files modified
6 ■■■■ changed files
releases.moxie 1 ●●●● patch | view | raw | blame | history
src/main/java/com/gitblit/git/PatchsetReceivePack.java 5 ●●●● patch | view | raw | blame | history
releases.moxie
@@ -11,6 +11,7 @@
    security: ~
    fixes:
    - Repository mailing lists could not be reset from the Edit Repository page (issue-399)
    - Fix closing ticket on push by parsing commit messages for closes|fixes (issue-404)
    - Ensure the Lucene ticket index is updated on repository deletion.
    changes:
    - Option to allow LDAP users to directly authenticate without performing LDAP searches (pr-162))
src/main/java/com/gitblit/git/PatchsetReceivePack.java
@@ -775,6 +775,9 @@
                }
                TicketModel ticket = ticketService.getTicket(repository, ticketNumber);
                if (ticket == null) {
                    continue;
                }
                String integrationBranch;
                if (StringUtils.isEmpty(ticket.mergeTo)) {
                    // unspecified integration branch
@@ -897,7 +900,7 @@
            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);
            }
        }