Forums

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

How do I get the commit message using the SDK?

Matthew Guidry
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 3, 2018

Hi,

I have been trying to create some hooks for Bitbucket for commit validation and can't seem to get the commit message properly.  This is now that ChangesetsBetweenRequest has been deprecated, as this is how I used to do it. 

This was the prior method I was using to do this:

ChangesetsBetweenRequest cbr =new ChangesetsRequest.Builder(context.getRepository()).exclude(refChange.getFromHash()).include(refChange.getToHash()).build();

 Then I would do a .getCommitsBetween(cbr, pageRequest).getValues()

Once I had this I could just do .getMessage()

 

Now I'm not sure how to get the information out of Bitbucket.

 

Thank you,

--Matt

1 answer

0 votes
Matthew Guidry
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 17, 2018

I finally found more documentation outlining what I needed, I had created a stash plugin which is what all the documentation and examples from Atlassian recommends.

When looking for this information it took a long time to get to this correct information, all other documentation and examples are old and deprecated.  Hope this will help someone else looking for this info:

https://developer.atlassian.com/server/bitbucket/how-tos/experienced-guide-to-bitbucket-server-plugin-development/

and

https://developer.atlassian.com/server/bitbucket/how-tos/hooks-merge-checks-guide/

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events