Вы можете использовать BitBucket API и выставить правильную команду, как в этой теме :
POST /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests
То есть:
curl -u user:myPW -H "Content-Type: application/jso https://bitbucket.server.com/rest/api/1.0/projects/myProject/repos/myRepo/pull-requests -X POST --data @req.json
с данными:
{"title":"test","description":"test","fromRef":{"id":"refs/heads/test-branch","repository":{"slug":"test-repo","name":null,"project":{"key":"myProject"}}},"toRef":{"id":"refs/heads/master","repository":{"slug":"myRepo","name":null,"project":{"key":"MyProj"}}}}