https://github.com/sorend/bitbucketserver-webhook-app.git
A Helidon 3.x based microservice for handling webhook requests from Bitbucket Server.
Can be pulled through Jitpack .
<dependency>
<groupId>com.github.sorend</groupId>
<artifactId>bitbucketserver-webhook-app</artifactId>
<version>3.0.0-1</version>
</dependency>
The Helidon application is wrapped in the Application static interface. You create a WebhookHandler, and pass it to Application.start. If you don't want to implement all methods in WebhookHandler, you can extend BaseWebhookHandler.
Basic getting started:
Config config = Config.create();
ServerConfiguration serverConfig = ServerConfiguration.create(config.get("server"));
String webhookPath = "/webhook";
BitbucketApi api = BitbucketClient.builder()
.endPoint("http://my-bit.bucket")
.token(config.get("bitbucket.token").asString().get())
.build();
WebhookHandler myHandler = new MyWebhookHandler(...);
ApplicationConfiguration appConfig = new ApplicationConfiguration(serverConfig, webhookPath, api);
WebServer webserver = Application.start(appConfig, myHandler);