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

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

Manushi Wijayapala May 24, 2017

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

1 vote
Answer accepted
rikf
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 17, 2018

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.

Manushi Wijayapala May 18, 2018

Thank you

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events