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

Need rest API endpoint to detect pull request merge conflicts before creating pull request

mohan yadav May 21, 2024

Need rest API endpoint to detect pull request merge conflicts before creating pull request as below , so if we are going to take bitbucket UI automatically detect conflicts file before creation PR. 

Please let me know which endpoint should I use to detect conflicts before creating PR.

Capture.PNG

1 answer

1 accepted

0 votes
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 23, 2024

Hey @mohan yadav ,

thank you for reaching out to Community!

You should be able to "preview" a file conflict in a merge by using the diffstat endpoint and comparing the two branches of the pull request: 

In the path of the URL you can either provide the commits you wish to compare, or the branch names.

For the conflicted files, the output will show the field "status": "merge conflict."

You can find more details and examples in this other similar question here in Community:

Thank you, @mohan yadav !

Patrik S

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events