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

I want to use bitbucket api to get all 30 days old commits made in repository

Sonal Rakwal
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!
July 1, 2024

Hi,

  I am using the below url and parameters in postman to get 30days old commits made in master branch of a repository.But this apicall is returning all commints and not 30 days old commits.

 

URL : 

q=date > "2024-06-02T00:00:00+00:00"

Authorization : Basic auth(username and Personal access token)

 

Once i get 30ndays old commits,i want to filter for only merge commits.

1 answer

1 vote
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 2, 2024

Hi Sonal,

Unfortunately - it is not possible to use filtering & sorting against the commits endpoint, you can see a list of supported endpoints below:

We have a feature request raised with our developers to include this in the API, however, that you may Watch for future updates and Vote for to increase its visibility from a customer demand perspective:

You can achieve those results by using git commands as a workaround:

git log --before="30 days ago"
git log --merges --before="30 days ago" 

 I hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events