Integration with repositories
In Yandex Tracker, you can set up integration with source code repositories on GitHub, GitLab, and Bitbucket to automatically display links to repository commits in Tracker issues.
To link commits to issues in Yandex Tracker:
-
Configure commit syncing between the repository and Yandex Tracker.
Depending on your repository, choose one of the data sync methods:
Configuring a webhook in the repositoryConfiguring periodic repository pollingThe repository will send commit information to Yandex Tracker. This approach allows for faster data synchronization, so new commits will appear in the dedicated Yandex Tracker issue almost immediately.
Yandex Tracker will periodically poll the repository for commits.
You can configure this sync method for repositories hosted online or deployed on your own server.
Syncing commits via a webhook configured in the repository is available only for GitHub and GitLab repositories hosted on your company’s servers.
When polling a repository, links to commits may appear in Yandex Tracker with a delay of up to 10 hours.
-
Enable commit display in the queue settings. This should be done in each queue where you need to display links to commits in issues.
-
To link a commit in the repository to an issue, specify the issue key in the commit comment. For example:
Fixing error TEST-123.You can view the linked commits:
- In the Commits tab on the issue page.
- On the queue commits page. To switch to the commits page from the queue page, click → Commits in the top right corner.
Configuring a webhook in the repository for syncing commits
To set up integration with Yandex Tracker, you need to configure a webhook in your repository to send new commit data to Tracker. To configure a webhook, first generate a URL and a token for the webhook in Yandex Tracker.
Synchronization via a webhook is available for GitHub and GitLab repositories hosted on your company’s servers.
Only a Yandex Tracker administrator can add repositories.
-
In Yandex Tracker, in the left-hand panel, click → Administration and then open Repositories.
-
Click Add and select Webhook.
-
Choose GitHub or GitLab in the Platform field.
-
In the Server address field, enter the repository domain without protocol and full path. Click Add.
-
Wait for the URL and token to appear in the window. Copy and save these values: you'll need them to configure the repository.
You can copy the value of the token only once, after it's been created. You can always create a new token if you lose the original one, but then you'll need to update the webhook settings in the repository.
-
Configure the webhook in your repository:
How to enable commit display in a queue
To see linked commits, enable this option in the queue settings:
-
In the left-hand panel, click Queues and select a queue.
-
In the top right corner of the queue page, click Queue settings.
-
Go to the Integrations tab.
-
Enable the option under Commits.
The task key is a unique identifier for the task. It consists of a queue key and a sequence number, for example: TEST-123. Using the key, you can navigate to the task using the link: https://tracker.yandex.com//TEST-123.