This question is in reference to Atlassian Documentation: POST service webhook for Bitbucket Server
The documentation for POST service webhook for Bitbucket Server, mentions in more than paragraph, that the JSON payload contains "the name of the user that made the push". However in the sample JSON extract, there is no reference to the user who made the push. How do I get that information fro the POST payload?
Hi Ashley,
On the page you mentioned the user is listed. Have a look at this part:
"toCommit":{ "id":"f259e9032cdeb1e28d073e8a79a1fd6f9587f233", "displayId":"f259e90", "author":{ "name":"jhocman", "emailAddress":"jhocman@atlassian.com" }
The "Author Name" of the commit it is moving to in this sample case is jhocman
.
Best regards,
Thiago Bomfim
DevTools
Hi Thiago,
Thanks for your reply, however I believe it doesn't answer my question.
The user `jhocman` in this case is the author of the commit it is moving to, not necessarily the user who made the push to bitbucket. Does that make sense?
For example my friend James could make three commits, then I could push those commits to bitbucket. In the JSON it will show the author of the `toCommit` as 'James' however I need a way to find out that 'Ashley' made the push to bitbucket.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashley,
Sorry for the late response. Got it now. Usually what I said will be the case, but you're right in saying that a user could be pushing commits s/he didn't author. If you want more detailed information on the commit ref changes (i.e. push), you can look into the database in the sta_push_ref.
The complete query with all the tables you need to join is on this KB:
I hope that helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.