Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Manushi Wijayapala
Contributor
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 edited

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
Contributor
May 18, 2018

Thank you

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events