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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to get to actual commit data in a BitBucket hook?

I'm trying to write a (Java) BitBucket hook, to be deployed in an on-premises instance of BitBucket 6.5, to enforce certain constraints on the contents of the files in the repo after the commit (and, possibly, the contents of the commit message itself).

I see the document at , and have been trying to understand the examples there and other examples I've found, but i'm still not sure exactly how to get a File or a URL or an InputStream for a file in the commit; nor the text of the commit-message as a String, nor the filenames in the commit.

Can I do that using objects reachable from the RepositoryHookRequest? Or can I call some factory-method to retrieve it, given the information in the Request? Or do i absolutely need to write a Callback to get that? 


0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,741 views 10 16
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you