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

I want the number of commits that were made on a specific branch for a date range using restapi .

Nanshu Arora
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!
August 26, 2024

 

I want the number commit count on specific branch for a date range using restapi .

 

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 29, 2024

Hello @Nanshu Arora ,

and welcome to the Community!

You can use the Bitbucket API to fetch commits from a specific branch, more specifically, the following endpoint:

https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/commits/{branch}

Replace {workspace}, {repo_slug}, and {branch} with your repository's workspace, repo slug, and branch name, respectively.

 

That particular endpoint does not directly support filtering by date range in the request itself, so you'll need to handle this filtering manually in your application or script. You'll retrieve the commits from that API endpoint and then filter them locally based on the date.

I hope that helps! Let me know in case you have any questions.

Thank you, @Nanshu Arora !

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events