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

Allow limiting PR builds to specified target branches #63

Closed nickbroon closed 8 years ago

nickbroon commented 8 years ago

This adds an advanced config option that should allow restricting builds to PR that are targeting specific branches. (my specific use to is to restrict builds only to PR targeting the master branch) Tested with a list of two branches, and PR targeting these and then PR targeting other branches, and it triggered appropriately. Default of no branches given also worked.

indrgun commented 8 years ago

Thank you. All your PR fit the use-cases we do here too.
If we can optionally configure the plugin to not create comment of "Build Start ..." and "Build Completed ..." that also would be superb. We want plugin to get triggered by PR only if target branch is the mainline and the build then would trigger separate sanity build that actually does the clone, mvn build and run sanity test. We want the sanity build to send the "Build Start ..." to the PR on Stash. The sanity build would pass the build status back to Stash.

nickbroon commented 8 years ago

@nemccarthy, if you're happy with these, it would be great to have them merged and a 1.5 release made? I've been running these in my environment and the plugins checked well over 100 PR without issue.

nickbroon commented 8 years ago

@nemccarthy thanks for merging all these! :-) I notice that the stash-pullrequest-builder-1.5.0 tag is missing, so the https://wiki.jenkins-ci.org/display/JENKINS/Stash+pullrequest+builder+plugin page hasn't updated.

nemccarthy commented 8 years ago

Thanks @nickbroon should be there now