Fix close ticket on push by commit message parsing (issue-404)
| | |
| | | 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)) |
| | |
| | | }
|
| | |
|
| | | TicketModel ticket = ticketService.getTicket(repository, ticketNumber);
|
| | | if (ticket == null) {
|
| | | continue;
|
| | | }
|
| | | String integrationBranch;
|
| | | if (StringUtils.isEmpty(ticket.mergeTo)) {
|
| | | // unspecified integration branch
|
| | |
| | | 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);
|
| | | }
|
| | | }
|