You can integrate a project in YouTrack with a GitLab repository. A GitLab integration enables the following features in YouTrack:
- Apply commands to YouTrack issues right from a commit comment or a pull request description. For more information, see Apply Commands in VCS Commits.
- Add links to YouTrack issues in commit messages. For more information, see Link Issues in VCS Commits.
- Your YouTrack server must be accessible from the Internet.
- A committer's email address in YouTrack must be the same as in GitLab. YouTrack searches for a user account based on the email address that is registered in GitLab. These users must also have permission to update issues in the connected YouTrack project. If no match is found or the user does not have the required permission, the commands are not applied.
Configure the GitLab Integration
When you enable and configure the GitLab integration, you define mappings between a YouTrack project and a GitLab repository.
As an administrator, you can enable the GitLab integration for any project in YouTrack.
To enable the GitLab integration:
- Open the page.
- Click the New VCS Integration button.
- From the Server drop-down list, select gitlab.com.
- Generate a private token in GitLab:
- Paste the token in the Private Token field.
- If you are not the repository owner, provide the repository owner name. If you are the owner of the repository, leave the field blank.
- Click the Connect to VCS server button.
- Enter values for the following settings:
- Click the Save button.
- Configure the integration in GitLab.
To set YouTrack issue IDs as links in GitLab commit messages, you need to configure this feature in GitLab. To locate this option, access the Integrations page in your GitLab project settings and select Custom Issue Tracker from the Project services list.