Azure DevOps support is currently in beta. Expect rough edges as we round out coverage.
Leave us feedback
Leave us feedback
Overview
Gitar connects to repositories in Azure DevOps via a Personal Access Token (PAT) associated with a dedicated service account. Gitar uses this token to read pull requests, post review comments, and set up webhooks that deliver events to Gitar in real time.Prerequisites
- An Azure DevOps organization
- Permission to create service accounts (users) in your Azure DevOps organization
- Project Administrator role on the projects you want to connect
Setup Instructions
Create a dedicated service account
Create a new user in your Azure DevOps organization to act as the Gitar service account.A dedicated account is required, not optional. Gitar identifies its own comments by the account ID of the PAT owner and ignores them to avoid processing its own output. If you use a personal account, every comment you post on pull requests will be silently ignored — Gitar will treat them as its own and never respond to your commands or questions.In Azure DevOps, go to Organization Settings → Users → Add users and invite a new user (e.g.,
gitar-bot@yourcompany.com).Grant Project Administrator role
The service account needs Project Administrator role on each project you want Gitar to access. This role is used to create and delete webhooks — during initial setup, when adding projects later, and when disconnecting. It must be kept for as long as the integration is active.For each project:
- Go to Project Settings → Permissions
- Select the Project Administrators group
- Add the Gitar service account as a member
Create a Personal Access Token
Sign in to Azure DevOps as the Gitar service account and create a PAT:
- Click your profile avatar in the top right → Personal access tokens
- Click New Token
- Set a name (e.g.,
Gitar) and choose your organization from the Organization dropdown - Set an expiration date — note this date so you can rotate the token before it expires
- Select Custom defined under Scopes and enable the following:
| Scope | Permission |
|---|---|
| Code | Read & write |
| Pull Request Threads | Read & write |
- Click Create and copy the token — it will not be shown again
Gitar will stop working when the PAT expires. Gitar will notify you in the dashboard when expiry is detected. To rotate, create a new PAT with the same scopes and update it under Settings → Integrations → Azure DevOps → Update token.
Connect in Gitar
- In the Gitar dashboard, go to Settings → Integrations
- Click Connect next to Azure DevOps
- Enter your Azure DevOps organization name (the part after
dev.azure.com/in your URL) - Paste the PAT
- Select the projects you want Gitar to access
- Click Connect
Permissions Explained
Code (Read & write)
Gitar reads pull request metadata, diffs, and commit history to analyze changes. Write access is needed to post review comments, set reviewer votes, update PR descriptions, and report commit statuses.Pull Request Threads (Read & write)
Gitar reads and writes to pull request comment threads. This scope is separate from general code access and is required for Gitar to post inline code review comments, reply to threads, and resolve discussions.Project Administrator role
Azure DevOps controls webhook access through project roles rather than PAT scopes. The Project Administrator role grants the service account permission to create and manage service hook subscriptions, which are how Gitar receives pull request events in real time.Troubleshooting
Validation fails with 'Service Hooks permission' error
Validation fails with 'Service Hooks permission' error
The service account does not have Project Administrator role on the project. Follow the step above to add the service account to the Project Administrators group for each connected project.
Gitar stops working after some time
Gitar stops working after some time
The PAT has likely expired. Go to Settings → Integrations → Azure DevOps, click Update token, and paste a newly created PAT.
Gitar doesn't see my repositories after connecting
Gitar doesn't see my repositories after connecting
Only projects selected during setup are monitored. To add more projects, go to Settings → Integrations → Azure DevOps → Add projects.
I renamed my Azure DevOps organization
I renamed my Azure DevOps organization
Renaming your organization breaks the integration because Gitar uses the organization name to route API calls. You must reconnect from scratch in Settings → Integrations → Azure DevOps → Disconnect, then reconnect with the new organization name.