When branches are not allowed in a MR build, log it.

This commit is contained in:
Duff, Robert W 2016-03-21 11:00:19 -04:00
parent e0d541d53a
commit fe53a772aa
1 changed files with 7 additions and 1 deletions

View File

@ -384,7 +384,13 @@ public class GitLabPushTrigger extends Trigger<Job<?, ?>> {
scheduledJob.scheduleBuild2(projectbuildDelay, action, new CauseAction(cause));
} else {
LOGGER.log(Level.INFO, "trigger on merge request not set");
if (triggerOnMergeRequest ) {
LOGGER.log(Level.INFO, "trigger on merge request not set");
} else if ( this.isBranchAllowed(req.getObjectAttribute().getTargetBranch())) {
LOGGER.log(Level.INFO, "branch {0} is not allowed", req.getObjectAttribute().getTargetBranch());
}
}
}