[Bitbucket] ]How to get commit details for a given repository and user using Bitbucket Java API

Hi,

I am developing a bitbucket plugin and for that I need to get the last committed date for a given repository by a given user. Is there anyway we can do that without using REST API?

I think we might be able to use ScmCommandFactory. But I could not find a good example on how to use it. I would really appreciate if someone could help me in this.

Thanks

1 answer

1 accepted

This widget could not be displayed.

Hi Manushi you can do this by using the

GitLogBuilder

See below for an example.

Page<Commit> page = builderFactory.builder(repository).log()
.order(GitRevListOrder.DATE)
.committer("displayName", "email@example.com")
.build(outputHandler)
.call();

I hope this helps.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Friday in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

167 views 9 2
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you