Reputation: 15
I found this API for retrieve all commits:
but the response includes merge commits. I want only original commits. Is there any way to exclude merge commits from the response?
Upvotes: 1
Views: 1425
Reputation: 136909
The Bitbucket Server API documentation shows an optional merges
parameter on this endpoint:
if present, controls how merge commits should be filtered. Can be either
exclude
, to exclude merge commits,include
, to include both merge commits and non-merge commits oronly
, to only return merge commits.
I think something like
https://bitbucket.mycompany.com/rest/api/1.0/projects/XXXXX/repos/wwwwww/commits/?merges=exclude
should do the trick.
Upvotes: 2