Azure DevOps

Connects workspaces to Git repositories in an Azure DevOps organization. Azure DevOps Server (on-premises) is not supported.

Connecting

Go to Settings → Version control → Azure DevOps and provide:

  • Organization — the organization name, as in dev.azure.com/my-org
  • Project — optional, see below
  • Personal access token — created in Azure DevOps under User settings → Personal access tokens

Grant the token these scopes:

  • Code (Read & write)
  • Pull Request Threads (Read & write)
  • Code (Status)
  • Service Connections / Subscriptions (Read, query & manage)

The last one is what lets us register the service hooks that trigger compliance runs. Without it a connection works for browsing but pull requests will not be checked.

The token is stored encrypted, and is validated against the organization before the connection is saved.

Pinning a project

Leave Project blank to browse every project the token can reach in the organization.

Set it to pin the connection to a single project. Pinning is required to create new repositories from Infracodebase, because Azure DevOps creates a repository inside a specific project rather than at the organization level.

To connect several projects without pinning, use one unpinned connection. To create repositories in several projects, add one pinned connection per project.

What you get

  • Repository access to list, connect, and create repositories
  • Two-way sync between the workspace and Azure DevOps
  • Pull request support to create, comment on, and merge pull requests
  • Compliance checks posted back to pull requests as commit statuses

If a connection stops working

The connection shows as no longer valid. Remove it and connect again with a new token.

Personal access tokens expire, and Azure DevOps caps how long they can live, so a connection needs its token replaced periodically. A token also stops working if the person who created it loses access to the organization, which is worth considering when deciding whose account creates it.