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

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

David_Lee_Lambert May 7, 2020

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 https://developer.atlassian.com/server/bitbucket/how-tos/hooks-merge-checks-guide/ , 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
TAGS
AUG Leaders

Atlassian Community Events