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

API v2 endpoint to get Pull Request conflict status

IlyaFinkelshteyn October 29, 2018

Right now we are using API v1 and this path to get Pull Request conflict status:

repositories/{repoName}/pullrequests/{pullRequestId}/conflict-status

As API v1 is going to be discontinued, what API v2 endpoint should we use to get information if get PR has a conflict and can be merged? 

1 answer

1 accepted

1 vote
Answer accepted
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 17, 2018

Hello there Iliya!
I spoke with my colleagues over in Bitbucket about your case.
They showed me the option of using diffstat to your needs:

- Bitbucket API - diffstat

We tested it and the conflict check was there when we tried merging conflicting commits.

Let us know if this addresses your need!

IlyaFinkelshteyn December 20, 2018

Just tried to use this API, it works. Thanks a lot!

Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 21, 2018

That is wonderful Iliya! Glad to know that this new API has what you need.

If you ever need help, come get it with us at the Community!

J7mboSixt July 24, 2019

Hey @Diegothanks for your answer! Exactly which is the field in here that indicates whether or not there are conflicts?

https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/diffstat/%7Bspec%7D

Like Bogdan Derevyaga likes this
IlyaFinkelshteyn July 24, 2019

@J7mboSixt  It is values/status. Its value would be merge conflict in case of PR has a conflict.

Mayank
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!
October 6, 2022

When hitting Get request on diffstat API, I'm only getting the differences for the PR not the merge conflicts status. In my case, the status is modified for the file having merge conflicts!

Any other way to check for the merge conflicts?
Like Andrei Solntsev likes this
Daniel Escaloni
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!
October 12, 2022

Same here @Diego  Is there an update or alternate solution? 

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events