πŸ“¦ sorend / bitbucketserver-webhook-app

β˜… 0 stars β‘‚ 1 forks πŸ‘ 0 watching
πŸ“₯ Clone https://github.com/sorend/bitbucketserver-webhook-app.git
HTTPS git clone https://github.com/sorend/bitbucketserver-webhook-app.git
SSH git clone git@github.com:sorend/bitbucketserver-webhook-app.git
CLI gh repo clone sorend/bitbucketserver-webhook-app
SΓΈren A D SΓΈren A D Merge pull request #126 from sorend/dependabot/gradle/org.slf4j-slf4j-api-2.0.9 d26a899 2 years ago πŸ“ History
πŸ“‚ master View all commits β†’
πŸ“ .github
πŸ“ gradle
πŸ“ src
πŸ“„ .gitignore
πŸ“„ .jitpack.yml
πŸ“„ .travis.yml
πŸ“„ build.gradle
πŸ“„ gradlew
πŸ“„ gradlew.bat
πŸ“„ README.md
πŸ“„ settings.gradle
πŸ“„ README.md

bitbucket server webhook app

A Helidon 3.x based microservice for handling webhook requests from Bitbucket Server.

Download

Can be pulled through Jitpack Release.

<dependency>
    <groupId>com.github.sorend</groupId>
    <artifactId>bitbucketserver-webhook-app</artifactId>
    <version>3.0.0-1</version>
</dependency>

Usage

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);