Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to check pull request has conflicts or not before merge the PR using rest api.

mohan yadav April 24, 2024

I want a bitbucket rest API endpoint to check whether a pull request has conflicts or not. Please suggest me that API endpoint.

 

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 25, 2024

Hello @mohan yadav

thank you for reaching out to the Community!

The following public API endpoint can be used to get the merge status if you call it without the topic query parameter

Example:

https://api.bitbucket.org/2.0/repositories/{WORKSPACE}/{REPOSITORY}/diffstat/feature..main

For the conflicted files, you will see in the output the field "status": "merge conflict".

The status "merge conflict" was not added as a status when the topic query is used because this status will be eventually removed in the future.

When that happens, a new public conflict API endpoint will be made available for customers to still have access to that information.

You can follow any changes/announcements to the API's at the official documentation below:

Thank you, @mohan yadav !
Patrik S

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events