Merge pull request #514 from czoellin/master
Fix branch name comparison to avoid spurious builds
This commit is contained in:
commit
03477fa591
|
@ -108,7 +108,7 @@ class OpenMergeRequestPushHookTriggerHandler implements PushHookTriggerHandler {
|
|||
|
||||
String targetBranch = mergeRequest.getTargetBranch();
|
||||
String sourceBranch = mergeRequest.getSourceBranch();
|
||||
if (targetBranch != null && branchFilter.isBranchAllowed(targetBranch) && hook.getRef().endsWith(targetBranch) && sourceBranch != null) {
|
||||
if (targetBranch != null && branchFilter.isBranchAllowed(targetBranch) && hook.getRef().equals("refs/heads/"+targetBranch) && sourceBranch != null) {
|
||||
LOGGER.log(Level.INFO, "{0} triggered for push to target branch of open merge request #{1}.",
|
||||
LoggerUtil.toArray(job.getFullName(), mergeRequest.getId()));
|
||||
|
||||
|
|
Loading…
Reference in New Issue