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

How to distinguish a merge commit in the list of commits in a pulll request?

Eduardo Rodrigues June 28, 2021

I am looking for a way to find which commit is a Merge Commit in a list of commits of a particular PR

 

repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/commits

https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pullrequests/%7Bpull_request_id%7D/commits

 

 

1 answer

1 accepted

0 votes
Answer accepted
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 2, 2021

Hi @Eduardo Rodrigues 

I'm afraid the API endpoint doesn't have a field that separates the merged commit from the others.
Right now, I've gone ahead and created a feature request to add a field that will distinguish that here. - https://jira.atlassian.com/browse/BCLOUD-21185
You can upvote and watch it so that you'll be notified of updates from our product team.
Please do note that we don't have an exact ETA for the feature request as all new features will be implemented according to our policy here.

May I ask if all your merged commit's messages have the format below?

"message" : "Merged in some_branch (pull request #123) ......"

If yes, maybe you can parse the "message" field with the format above?

Regards,
Mark C

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events