I need to develop a webhook in bitbucket server which would fire when a pull request task is checked/unchecked (since this webhook type is not provided out of the box)
Does anybody know of any documentation/tutorial/code example I could use to start this project with?
Please, don't answer with already available apps, even if they're free.
Hi @Javier Perez,
You might want to start here: https://confluence.atlassian.com/bitbucketserver/managing-webhooks-in-bitbucket-server-938025878.html
It looks as thought the documentation outlines what you are looking for in the creating & trigger webhooks sections.
I hope that helps!
-Jimmy
That documentation would be instructions on how to set webhooks on out of the box provided events, which are
Pull request events
There is no pull request task checked/unchecked event in the list.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you please provide a bit more information about what events you are trying to capture when you say checked/unchecked as it relates to a pull request?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jimmy,
See the screen-shot below. The webhook I intend would trigger when the check box Sanity Passed changed state (checked<->unchecked which would result in the task state transition OPEN<->RESOLVED)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Javier Perez,
Ok now I understand what you are trying/wanting to accomplish. I think where you are going to need to start is in the Java API since it looks like you are going to want/need to create a new event to trigger and specifically you will want to look at the PullRequestEvent Class: https://docs.atlassian.com/bitbucket-server/javadoc/6.7.1/api/com/atlassian/bitbucket/event/pull/PullRequestEvent.html
From there you will want call the new event you have created anytime you check/uncheck the checkbox you have added to the pull request comment.
I hope that helps as a starting point.
-Jimmy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.