Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get a list of commits from different branch?

kesavamoorthy December 10, 2018

Hi

I am using this syntax in order to get the list of commits between two commit id

/rest/api/1.0/projects/<project>/repos/<repo>/commits?since=%s&until=%s

But in the result, the list of commits are not all relevant to the branch which i expected.

Any clue? 

 

Note: My default branch is "master", here I am trying to get the list of commits between two commit id of "stable branch"

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 13, 2018

Hi! 

How are you identifying the branch? I believe you should be able to achieve it by using the REST API v2, for more info https://developer.atlassian.com/bitbucket/api/2/reference/.

Hope that helps,

Ana

kesavamoorthy December 13, 2018

Hi,

Thanks for the reply. As of now I am not identifying the branch. My goal is to get the list of commits between two commit id's irrespective of any branch. 

1. What is the syntax to be used to find the source & destination commit id's belong to which branch?

2. What is the REST API syntax to be used to mention the branch name?

kesavamoorthy January 3, 2019

@Ana RetamalI tried it didnt work out. Can you please help here for the syntax?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events