Indexing Triggers

What’s on this page:


What are indexing triggers and why use them?

Indexing triggers (webhooks) can be an extremely powerful tool that can be configured to activate an immediate re-index of your repositories from remote systems. Your git server can send this near real-time data to Jira when your git data changes. This results in a much faster indexing time where you don’t have to wait for the regular polling interval (see General settings).

Webhooks can be initiated whenever certain actions are performed. For example, you can configure a webhook to execute when:

  • a new commit is pushed

  • a pull request is opened

  • a branch is merged

You can create indexing triggers for individual repositories. Most git providers will also allow you to create webhooks at an account-level or org-level.

Do I need to set up indexing triggers?

By configuring indexing triggers to initiate reindexing, Jira will more often have up-to-date information.

Without setting up indexing triggers, you will be relying on the default polling of the app which is unchangeable by non-Jira administrators. Jira users will have to wait for the default interval for updates (usually 5 minutes) – which means users will not quickly see new commits or pull requests until the next indexing interval.

Getting started

Important
To use the indexing triggers feature, it must be enabled in the Manage (Git) repositories ➜ Indexing triggers page.

Configure indexing triggers to activate immediate reindex of your repositories from remote systems.

  1. From your Jira dashboard menu, go to AppsGit Integration: View all repositories. (Alternatively, go to Jira SettingsApps).

  2. On the sidebar, click Indexing triggers. The following screen is displayed.

  3. Enable/disable the indexing trigger feature by clicking on the Indexing triggers enabled toggle switch.

Where to get the indexing triggers webhook URL?

The webhooks URL can be accessed on the following locations:

  1. From your Jira dashboard menu, go to AppsGit Integration: View all repositories. On the sidebar, click Indexing triggers. (Alternatively, go to Jira SettingsApps. On the sidebar, click Indexing triggers).

  2. On the Manage Git repositories configuration page, click the Indexing triggers button at the top right of the page.

  3. In the Manage repository page of a tracked repository — click on a repository/integration from the git configuration list. Look for the Webhook URL field.

  4. In the Repository Settings page of a repository in a tracked repository or a single connected repository — on the git configuration page, go to Actions ➜ Show integration repositories.

The Secret Key is a secure random-generated alphanumeric string at the time of the Git Integration for Jira app installation. The user can change this to a different value by generating another secret token according to your Git host.

Use this key in the form of:

Copy the Webhook URL to the system clipboard by clicking the copy icon adjacent to the right. Use this URL when required by the repository web hooks setting of your git host.

Example

Assign your Jira base URL and Secret Key to the example URL structure:

https://gitforjiracloud.bigbrassband.com/api/1/webhook/reindex/install/x5chdqpqln0j04xcgv02zy7h9/vfTmXtqIFyqeCYYS3WjLIn2RRz5rHSDO

HTTP Method
All the repositories will be reindexed if the URL specified above is activated through GETPOST, or PUT and the webhooks are enabled.

There is no support for other HTTP methods such as DELETE or HEAD

Setting up indexing triggers (video guide)

Watch the video guide below to get familiarize with indexing triggers setup in Jira Cloud:

Right click here to open this video in a new tab/window for more viewing options.

Levels of Webhook URL

There are three (3) levels of webhook url:

  1. Install level

  2. Integration Level

  3. Repository level

Each level references which webhook URL was utilized to configure the webhook:

Webhook URL: Install level

This is the default webhook URL that is added upon the installation of the Git Integration for Jira app. For this level, events are triggered for all configured repositories.

We recommend to use this webhook URL because it's generally easy to configure and simple to understand.

Webhook access location:

  • Manage Git repositories sidebar, Indexing triggers

  • Click Indexing triggers button at top right of Manage Git repositories page

Webhook URL: Integration level

Webhook URL: Integration level

This webhook URL triggers events only for the repositories within that integration.

Webhook access location:

  • Manage Git repositories page ➜ Actions ➜ Edit integration settings

Webhook URL: Repository level

This webhook URL triggers events only for the configured repository.

Webhook access location:

  • Manage Git repositories page ➜ Actions ➜ Show integration repositories ➜ click a repository; or

  • Manage Git repositories page ➜ Actions ➜ Edit repository settings

For indexing to trigger, the repository URL that arrives in the webhook payload must match a repository that is in the Git Integration configuration account. However, it must also match within the webhook level.