Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,293,246
Community Members
 
Community Events
165
Community Groups

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

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

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
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,084 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you