Hello,
I'm trying to create a PR via the API, where the source is my own fork, the the destination is the main repository.
I get this error:
{"type": "error", "error": {"fields": {"destination": ["destination repository cannot be changed"]}, "message": "destination: destination repository cannot be changed"}} Here's my command:
curl \
-X POST \
-H "Content-Type: application/json" \
-u username:app_password\
https://bitbucket.org/api/2.0/repositories/username/repo-fork/pullrequests \
-d '{
"title": "test",
"description": "testing automated PR",
"source": {
"branch": {
"name": "test"
},
"repository": {
"full_name": "username/repo-fork"
}
},
"destination": {
"branch": {
"name": "master"
},
"repository": {
"full_name": "username2/repo"
}
},
"reviewers": [ { "username": "user" } ],
"close_source_branch": false
}'
Why does this editor remove all my newline breaks when I paste code from my editor? Anyway... any ideas how do I make a PR from a fork to the main repository?
Thank you!