The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to create Bitbucket pull request using Atlassian Java SDK

Jiawei Zhu
May 17, 2021

Hi all!

By using the bitbucket Java APIs (eg: https://docs.atlassian.com/bitbucket-server/javadoc/4.0.0/api/reference/com/atlassian/bitbucket/pull/PullRequest.html), I am able to make commits via Bitbucket Java API based on an existing pull request in the Bitbucket server.

But I wonder if I can use the Bitbucket Java API to actually create a PullRequest? (eg: create repository, make file changes in that repository to create commit, open a pull request for that commit, and merge the pull request to the master branch.) It seems like Bitbucket API classes like PullRequest, Repository only provides getter methods. (https://docs.atlassian.com/bitbucket-server/javadoc/4.0.0/api/reference/com/atlassian/bitbucket/repository/Repository.html, eg: https://docs.atlassian.com/bitbucket-server/javadoc/4.0.0/api/reference/com/atlassian/bitbucket/pull/PullRequest.html) 

 

Any help is greatly appreciated!

Thanks!

Jiawei

 

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events