Forums

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

Is there any list of bitbucket pull-requests/new query parameters?

lukas_klima
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 25, 2021

Hello, is there any list of this feature?

 

We already found that we can use source and dest. But it would be useful another form inputs, is there any way to configure Title and Close checkbox??

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 25, 2021

Hi @lukas_klima ,

I assume that you are referring to creation of pull requests via Bitbucket API?

You can configure PR title with the field title which is a string, close source branch checkbox with close_source_branch which is boolean (you can set it to true or false).

An example call would be as follows:

curl -X POST -u username:app-password https://api.bitbucket.org/2.0/repositories/<workspace-id>/<repo-slug>/pullrequests --header 'Content-Type: application/json' --data '{"title": "My PR Title ", "source": {"branch": {"name": "feature-branch"}},"destination": { "branch": {"name": "master"}},"close_source_branch":false}'

You can see more fields in the following link, in the section that gives examples (you can also set PR description and reviewers):

If you have any questions, please feel free to let me know.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events