| | |
| | |
|
| | | /** Extracts the ticket id from the ref name */
|
| | | private long getTicketId(String refName) {
|
| | | if (refName.indexOf('%') > -1) {
|
| | | refName = refName.substring(0, refName.indexOf('%'));
|
| | | }
|
| | | if (refName.startsWith(Constants.R_FOR)) {
|
| | | String ref = refName.substring(Constants.R_FOR.length());
|
| | | if (ref.indexOf('%') > -1) {
|
| | | ref = ref.substring(0, ref.indexOf('%'));
|
| | | }
|
| | | try {
|
| | | return Long.parseLong(ref);
|
| | | } catch (Exception e) {
|
| | |
| | | * @return the patchset command
|
| | | */
|
| | | private PatchsetCommand preparePatchset(ReceiveCommand cmd) {
|
| | | LOGGER.info(MessageFormat.format("Preparing {0} patchset command for \"{1}\" received from {2}",
|
| | | repository.name, cmd.getRefName(), user.username));
|
| | | String branch = getIntegrationBranch(cmd.getRefName());
|
| | | long number = getTicketId(cmd.getRefName());
|
| | |
|