Skip to main content
Skip table of contents

Repository Level Configurations

Get started guide for Post Webhooks for Bitbucket app on the repository level.

Different repositories may have unique integration requirements with external services or applications. With repository-level configurations, you can set up specific webhooks for each repository, enabling seamless integration with repository-specific tools, services, or workflows. Different teams or individuals working on a repository can set up their webhooks to suit their needs.

Configuration

To start the Post Webhooks for Bitbucket plugin configuration on the repository level you have to add a new webhook in the Repository Settings section:

  1. Move to the Bitbucket repository where you wish to set up Post Webhooks for Bitbucket app.

  2. Navigate to the Repository settings by clicking on the “gear” button on the left sidebar.

  3. On the Workflow section find our application Post Webhooks.

  4. From the Configurations tab, click image-20240712-102622.png

  5. After you have specified all the necessary parameters click on the Save button.

To enable the creation of multiple rules on the repository level contact your Bitbucket administrator.

image-20240715-183645.png

Below you can find a short definition of each parameter:

Parameter

Definition

INCOMING WEBHOOK URL

resourse where the data should be sent. Also you have to specify the HTTP method to be used when making requests to the target URL:

  • POST;

  • PUT;

  • GET.

Skip URL Validation

by enabling this parameter the app will allow you to use URLs that may not conform to the standard validation rules

Enable Authentication

the app adds an authentication mechanism to the webhook requests, ensuring that only authorized parties can access the webhook endpoint. By enabling this option you have to specify:

  • Authentication type - the type of authentication to be used when sending requests to the webhook URL: Basic, Bearer or Kerberos authentication;

Kerberos authentication is available since 3.22.12

  • depending on type you choose you have to specify authentication details, such as, Username, Password or Token.

Enable Mutual TLS

enabling mutual TLS ensures that only trusted clients with valid and verified certificates can establish a connection with the webhook endpoint. By enabling this option you have to specify folowing parameters:

  • Path to Key Store - contains the private key and the associated certificate used for Mutual TLS authentication.

  • Path to Trust Store - contains trusted certificates used to verify the authenticity of other parties during Mutual TLS authentication.

  • Key Store Password - the password required to access the Key Store file.

  • Trust Store Password - password needed to access the Trust Store file.

Skip SSL Certificate Validation

this parameter instructs the app to skip the validation of SSL certificates, allowing the connection to be established even if the certificate cannot be verified.

Payload type

allows you to specify which payload type should be sent.

Supports:

  • Jenkins

  • Azure DevOps

  • Microsoft Teams

  • Bitbucket (native format)

  • GitHub

The Azure DevOps pipeline that should be triggered when the webhook event occurs. By enabling this option additionality you have to specify folowing parameters:

To trigger GitHub workflow use the following parameters,

  • the URL should have the following format https://api.github.com/repos/{REPO_OWNER}/{REPO_NAME_SLUG}/actions/workflows/{workflow.yml_FILE}/dispatches

  • The payload to send contains key value set of parameters your workflow expects.

  • Example of the payload

CODE
{"ref": "master", "inputs":{"eventType": "{eventType}","projectKey": "{projectKey}", "repositorySlug": "{repositorySlug}","branch": "{branch}"}}

Find more details on GitHub workflow integrations with Bitbucket here

Trigger GitHub workflows

Repository (Push) events

allows you to specify the type of events that should trigger the webhook

Include branches

the comma-separated list of Bitbucket branch regular expressions that should be considered when filtering events.

For instance, release/*, tag/*, etc.

Exclude branches

the comma-separated list of Bitbucket branch regexes that should be ignored.

Pull request events

allows you to specify the type of events that should trigger the webhook

Include 'From' branches, Included 'To' branches

the comma-separated list of Bitbucket branch regexes that should be included

Excluded 'From' branches, Excluded 'To' branches

the comma-separated list of Bitbucket branch regexes that should be ignored.

Excluded users

the comma-separated list of Bitbucket user names that should NOT trigger an event. This is often used to ignore pushes from your continuous integration user.

Important: not display names, but usernames. For instance, jenkins-user.

File path pattern

comma-separated list of file paths, only commits on these file paths will trigger the webhook.

For example, src/java/.*/src/main/resources/.*properties will trigger events only for the changes in the properties files.

Repository pattern

a pattern or regular expression that defines the repositories for which the webhook should be triggered. Commits on these repositories will trigger this hook.

For instance, .*-Jenkins

Skip CI

skip triggering events for commits/pull requests that include the [skip ci] or [ci skip] keywords in their title or description.

Skip Forked repositories

skip the events that occur in forked repositories.

Include projects

comma-separated list of Bitbucket project keys that will trigger this event.

Exclude projects

comma-separated list of Bitbucket project keys that will be IGNORED for this event. This could be used with the combination of Include projects empty (include all).

Notification name

the name of the configuration

Our advice is to name something meaningful to you and your team so that it can be understood later easier.

Enable rule configuration

Disable to prevent this ruleset being active

A table of created webhooks provides a centralized view of all webhooks configured across your Bitbucket repository. It makes it easier to manage and monitor them.

image-20240715-184249.png

For the selected webhooks list you are able to apply the following actions:

  • Disable

  • Enable

  • Delete

Query string parameters support

How to use query string parameters


How to set up Azure DevOps Pipeline triggering from Bitbucket Server?

How to integrate Bitbucket Server with Jenkins Pipelines?

How to enable notifications from Bitbucket in Microsoft Teams?

How to choose an authentication type?

Updated:

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.