Skip to content

JENKINS-39392 don't disable pull request scanning for bitbucket server instances#24

Closed
mrooney wants to merge 2 commits intojenkinsci:masterfrom
mrooney:master
Closed

JENKINS-39392 don't disable pull request scanning for bitbucket server instances#24
mrooney wants to merge 2 commits intojenkinsci:masterfrom
mrooney:master

Conversation

@mrooney
Copy link
Member

@mrooney mrooney commented Oct 31, 2016

As per https://issues.jenkins-ci.org/browse/JENKINS-39392:

Currently the plugin checks if the repo is public, and doesn't allow building PRs, "Skipping pull requests for public repositories." While I assume this is for security purposes for Bitbucket.org, it is a problematic limitation for private Bitbucket Server instances that use a PR-based flow and have the repo "Public", which only means it can be viewed and cloned. Only authenticated users can push and create pull requests and we need to be able to discover and test these effectively private pull requests.

I'm not sure if this behavior is intentional even for Bitbucket Server instances; if so, there should be a configuration option to enable this or, if "PR*" is in the branch pattern, it should be enabled since it is specifically requested.

@aaron-trout
Copy link

aaron-trout commented Nov 1, 2016

We have this problem too, and I'm currently running a custom version of the plugin with that if statement removed :-)

I think ideally it should be configurable when creating a bitbucket branch source folder.

UPDATE: Sounds like #9 implements an option for enabling / disabling PR building


String branchNameForExclusionTest = branchName;
if (pr != null) {
branchNameForExclusionTest = String.format("PR-%s %s", pr.getId(), pr.getSource().getBranch().getName());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is related to the fix explained in the description, but useful I think.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies, you are right @amuniz, I didn't realize future commits to my fork updated the PR. This is a fix to allow "PR-*" branch matching to work (https://issues.jenkins-ci.org/browse/JENKINS-36890). Would you like me to file this as a separate PR?

@nickbroon
Copy link

👍

@stephenc
Copy link
Member

superseded by #53

@stephenc stephenc closed this Jun 12, 2017
fengxx pushed a commit to fengxx/bitbucket-branch-source-plugin that referenced this pull request Mar 13, 2018
…s-descriptor-api

Remove useless MultiBranchProjectDescriptor#getSCMDescriptors() API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants