Overview
The Gitar YouTrack integration connects a YouTrack instance, YouTrack Cloud or self-managed, to your pull requests. Gitar reads issues, creates and updates them, comments, and moves them between states.https://your-company.youtrack.cloud.Read Linked Issues
PROJ-123 reference from a PR title, description, or branch nameValidate Against the Issue
Create and Update
Comment and Transition
Before you start
You need an organization admin role in Gitar to manage integrations. Your Gitar plan must include connecting YouTrack. See Plans. In YouTrack, you need permission to create the service account and grant it access to the intended projects. Connecting YouTrack and running YouTrack actions through Gitar are separate capabilities. Requests to read or search issues, create or update issues, add comments, or change issue states require Enterprise, whether they come from a PR comment, repository rule, or skill. The service account’s effective permissions and issue visibility restrictions still apply. YouTrack Cloud does not require the self-managed infrastructure checks below. Enter your tenant URL and continue to Connect YouTrack. Self-managed, check your instance against two requirements:- HTTPS on port 443 with a publicly trusted certificate. A self-signed certificate does not work.
- Reachable from Gitar. If you enforce an inbound allowlist, add Gitar’s public IP addresses.
https://tools.your-company.com/youtrack.
Connect YouTrack
Create a service account
- In YouTrack, open Administration → Access Management → Users
- Click New user, then Create user
- Complete the account details for a dedicated
gitar-serviceaccount and click Create
Give the account a project role
- Open each project Gitar should work with
- Open Settings → People. Some versions label this page Access.
- Click Add people and select
gitar-service - Turn off Add to team to assign a role directly
- Under Roles, select Contributor for issue updates, or the custom read-only role described below for read-only use, then click Invite
Generate a permanent token
- Sign in as
gitar-service - Open Profile → Account Security
- Under Tokens, click New token and name it
gitar - Select the YouTrack scope. YouTrack Administration alone does not permit issue access.
- Click Create token, then Copy token before closing the dialog
Connect YouTrack in Gitar
- Go to your organization’s Settings in the Gitar dashboard
- Open the Integrations section
- Find the YouTrack card under Ticketing & Documentation and click Connect
Using YouTrack in rules
Name YouTrack explicitly in a custom rule. Include the issue key or project, the action to perform, and the event that should trigger it. Gitar can read and search issues, list a project’s issues, create and update issues, post comments, and change issue states. See Rules for rule setup and supported triggers. Changes in YouTrack do not trigger Gitar runs. Choose a pull-request event for the rule. Search uses YouTrack’s query language. In a query such as#Unresolved Assignee: me, me means the service account whose token Gitar uses. Results match that account’s access, which may differ from your own YouTrack session.
Functional validation needs no custom rule. It requires Enterprise, a private repository, and Validate PRs against linked issues enabled under Settings → Configuration → Behavior.
Use a linking phrase such as Fixes PROJ-123 in the PR description. A passing mention such as see PROJ-123 does not link the issue.
Expand Verification → Functional validation in Gitar’s dashboard comment to inspect objective coverage. See Functional Validation for the complete linking rules and limits.
Verify access
The PR-request and rule-based checks below require Enterprise. A successful connection or credential check does not establish that these agent actions are available on your plan. Verify issue reads and updates separately before enabling rules broadly. In Settings → Integrations, open YouTrack with Configure and wait for the automatic check. Confirm that the expected account and a visible project appear. Use a disposable issue created by someone other thangitar-service. This tests access to another user’s issues. Record its original summary. Replace PROJ-123 in the examples with that issue’s key.
Check issue reads
Create.gitar/rules/youtrack-read-check.md on a test branch:
[YouTrack access check] Read. Expand Verification in Gitar’s dashboard comment to inspect the recorded actions. Confirm that the requested PR comment matches the issue in YouTrack.
Check issue updates
After the read succeeds, create.gitar/rules/youtrack-update-check.md on the same test branch:
[YouTrack access check] Update to trigger evaluation. Inspect Verification and the result comment, then confirm the changed summary in YouTrack.
A successful read does not establish update access. A successful summary update does not verify commenting, issue creation, or state changes. Test the additional actions your workflow needs separately.
Clean up
Change the PR title to[YouTrack access check] Complete. Restore the original issue summary in YouTrack, remove both temporary rule files, and close the test PR without merging the verification rules.
Best practices
Start with limited access and verify the actions your rules will perform.- Use a dedicated account and restrict its effective access to the intended projects.
- Start with one project. Verify issue reads and updates separately before enabling rules broadly.
- Name the issue, field, and intended value in update rules. For transitions, include the project’s state-field name and exact target state.
- Keep requirements in the issue description clear enough for functional validation to assess.
- Keep searches focused on a project. Use an explicit assignee when the rule should find someone other than the service account.
- Store tokens securely and rotate them according to your policy. Never place them in rule files or PR comments.
Manage the connection
To rotate the token, create a replacement in the service account’s YouTrack profile with the YouTrack scope. In Gitar, open Settings → Integrations → YouTrack → Configure, enter it in Permanent Token, wait for the check, and click Update. Verify access before deleting the old token in YouTrack. Leave the token field blank when changing other settings to keep its existing value. To stop using the integration, open Configure, click Disconnect, and confirm. Disconnecting Gitar does not revoke the YouTrack token. Delete the token in YouTrack separately if it is no longer needed.Frequently Asked Questions (FAQ)
Does this work with YouTrack Cloud?
Does this work with YouTrack Cloud?
https://acme.youtrack.cloud, and mint the permanent token the same way, under the service account’s profile. No separate API host to enter.Can I give Gitar read-only access?
Can I give Gitar read-only access?
Which projects can Gitar see?
Which projects can Gitar see?
Can I use YouTrack alongside Jira, Linear, or Plane?
Can I use YouTrack alongside Jira, Linear, or Plane?
PROJ-123 to the first connected tracker in this order: Jira, Linear, Plane, then YouTrack. A failed lookup does not try the next tracker.Use a custom rule that explicitly names YouTrack for YouTrack actions. This does not change which tracker functional validation selects.Do I need to enable markdown?
Do I need to enable markdown?
Do permanent tokens expire?
Do permanent tokens expire?
Why was my base URL rejected?
Why was my base URL rejected?
/api is fine and is trimmed for you.Why does the credential check fail?
Why does the credential check fail?
Why can Gitar see a project but not an issue?
Why can Gitar see a project but not an issue?
Why can Gitar read an issue but not update it?
Why can Gitar read an issue but not update it?
Why did issue creation report an error after creating an issue?
Why did issue creation report an error after creating an issue?
Why is an issue missing from functional validation?
Why is an issue missing from functional validation?