Skip to main content
Azure DevOps support is currently in beta. Expect rough edges as we round out coverage.
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

1

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).
2

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:
  1. Go to Project Settings → Permissions
  2. Select the Project Administrators group
  3. Add the Gitar service account as a member
If you want to give Gitar access to all projects in the organization, you can instead add the service account to the Project Collection Administrators group at the organization level: go to Organization Settings → Permissions → Project Collection Administrators and add the service account there.
3

Create a Personal Access Token

Sign in to Azure DevOps as the Gitar service account and create a PAT:
  1. Click your profile avatar in the top right → Personal access tokens
  2. Click New Token
  3. Set a name (e.g., Gitar) and choose your organization from the Organization dropdown
  4. Set an expiration date — note this date so you can rotate the token before it expires
  5. Select Custom defined under Scopes and enable the following:
ScopePermission
CodeRead & write
Pull Request ThreadsRead & write
  1. 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.
4

Connect in Gitar

  1. In the Gitar dashboard, go to Settings → Integrations
  2. Click Connect next to Azure DevOps
  3. Enter your Azure DevOps organization name (the part after dev.azure.com/ in your URL)
  4. Paste the PAT
  5. Select the projects you want Gitar to access
  6. Click Connect
Gitar will validate the token and set up webhooks on the selected projects automatically.

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

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.
The PAT has likely expired. Go to Settings → Integrations → Azure DevOps, click Update token, and paste a newly created PAT.
Only projects selected during setup are monitored. To add more projects, go to Settings → Integrations → Azure DevOps → Add projects.
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.