Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I make the pull-requests section of pipelines work when merging between forks?

maxgrenderjones June 13, 2019

I have a pull-requests section in my `bitbucket-pipelines.yml` file defined line so:

pipelines: 
pull-requests: '**':
- step:
... lots of steps...

When I open a pull request between two branches of my repository, a build is triggered as expected. But when someone opens a build from a fork of my repository back to my repository, no build happens.

Am I missing some configuration necessary to make this happen, or is it not yet supported?

1 answer

1 accepted

0 votes
Answer accepted
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 14, 2019

Hello @maxgrenderjones

I see what you mean, but unfortunately, this feature is not available. 
There is an improvement request for this at [#13162] - Pipelines for pull requests from forks.

I suggested the following workaround in this post Trigger pipeline on pull request from fork.

  1. Create a new branch just for submitting pull requests from fork to the main repository
  2. Accept all the pull requests without testing them
  3. Create pull requests from this branch to the main branch. This will trigger the pipeline build which will be used to check the pull request.

It is not beautiful, but it may help you to overcome this problem now.

Please let me know if you have questions on this.

maxgrenderjones June 14, 2019

Thanks. Please note that https://bitbucket.org/site/master/issues/13162 is a (more complex?) request - it seems like the user wants to share their pipelines account if someone opens a PR into their repo. In this case I want the user to use their own pipelines account (just as they would if it was a normal `branches` build), just have that build:

  • only trigger when they open a pull request
  • test against a pre-merged result

I agree your workaround would work, but I think it's probably not worth the effort and we'll go back to using `branches` builds. Shame, because without this capability the `pull-requests` feature is pretty useless for us.

Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 18, 2019

Hi @maxgrenderjones

I understand your pain and I would love to have a better solution for your now. I visited the Bitbucket support team to talk about this issue and check if it would be better opening a different issue to cover the simplified case involving the same pipelines account. Our conclusion was that we prefer to put more weight in the improvement already open (which will cover all the scenarios) than open a new one that might not have the same attention.

Please be vocal and share your comments/vote on https://bitbucket.org/site/master/issues/13162. It will help our development and product management team to prioritize this issue.

Let me know here If I can do anything else to empower you moving forward despite this limitation.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events