It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

problems creating PR's between forks using the API Edited

Anders Borum Mar 26, 2019

I'm trying to add pull request support to my Git client Working Copy and having trouble pull request is between forks. In these tries I'm authenticated as user=workingcopy that has pullrequest privileges.

Specifically I try to make a PR where the source master branch on
and the destination is master branch on

I POST the pull request content

    {"title" = "My title",
     "destination": {"branch": "master"},
     "source": {"branch": "master",
     "repository": {"repo_slug": "game",
     "username": "workingcopy"}}

to the endpoint
but this gives me the errror message
   "Source and destination must be different"

I tried including the "repository" dictionary inside "destination" but the error is the same.

I'm also having trouble creating cross-repository pull requests when branch names are different.

Trying to create a pull request where the source master branch on
and the destination is release branch on
I get the error message
    "You do not have access to repository palmin/game and therefore you can not create a pull request."

The web-interface allows me to open a pull request like this when logged in as "workingcopy".

Any suggestions on things to do differently?

1 answer

1 accepted

0 votes
Answer accepted
Ana Retamal Ortiz Atlassian Team Apr 12, 2019

Hi Anders,

I've talked to some of my colleagues from the Bitbucket Cloud team and they provided the following solution. Can you edit this command according to your needs?

curl -X POST -H "Content-Type: application/json" -u username:apppass -d '{ "title": "anotherBranch to master", "description": "AUTO: anotherBranch to master", "source": { "branch": { "name": "anotherBranch" }, "repository": { "full_name": "testingteamlog/repositorya" } }, "destination": { "branch": { "name": "master" } }, "close_source_branch": false }'
his syntax was wrong
he used this for source:

"source": {"branch": "master",
"repository": {"repo_slug": "game",
"username": "workingcopy"}}

while this is the source:
source": { "branch": { "name": "anotherBranch" }, "repository": { "full_name": "testingteamlog/repositorya" } }

Hope that helps!


Anders Borum Apr 12, 2019

Thank you. This is just what I needed. 🙏


Not sure why I couldn't figure this out on my own, but I did try many things.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

1,814 views 1 19
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you