nemccarthy / stash-pullrequest-builder-plugin

A Jenkins plugin for Building Stash Pull Requests
https://wiki.jenkins-ci.org/display/JENKINS/Stash+pullrequest+builder+plugin
Other
64 stars 130 forks source link

Building specific targeted branches #69

Closed jhunthrop closed 8 years ago

jhunthrop commented 8 years ago

When using the "Build PR targetting only these branches" parameter, the plugin will only build the first branch specified.

Test Cases:

Skipping Message:

Jan 06, 2016 1:07:02 PM stashpullrequestbuilder.stashpullrequestbuilder.StashRepository isBuildTarget
INFO: Skipping PR: 58 as targeting branch: dev
Jan 06, 2016 1:07:02 PM stashpullrequestbuilder.stashpullrequestbuilder.StashRepository isBuildTarget
INFO: Skipping PR: 59 as targeting branch: master

The code looks as though it should perform as expected. Is there something I'm missing?

java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
Jenkins ver. 1.625.3.1 (CloudBees Jenkins Enterprise 15.11)
nemccarthy commented 8 years ago

I see the problem; https://github.com/nemccarthy/stash-pullrequest-builder-plugin/blob/a4a6abe370e0d0489edcc1d30101c50cd924ad79/src/main/java/stashpullrequestbuilder/stashpullrequestbuilder/StashRepository.java#L312

This return is too soon. Should return at the end of the for loop. I'll fix and push a new version

jhunthrop commented 8 years ago

Thanks! Can the be released as a hotfix release?

nemccarthy commented 8 years ago

Released 1.5.2 yesterday! http://updates.jenkins-ci.org/download/plugins/stash-pullrequest-builder/

nickbroon commented 8 years ago

:+1: