Azure DevOps Integration
PanDev Metrics integration with Azure DevOps allows you to analyze development activity in Azure Repos, pull requests, and link metrics with Azure Pipelines.
Integration Features
- Automatic PR Comments — adding code quality metrics to pull requests
- Repository Analytics — analysis of commits, branches, and contributors
- Code Review Metrics — review time, number of comments, PR cycle time
- Pipeline Connection — analytics of builds and deployments
- Work Items — linking tasks to code
Supported Versions
- Azure DevOps Services (Cloud)
- Azure DevOps Server (On-Premise)
Integration Setup
Step 1: Create a Service Account
Create a separate Azure DevOps account that will be used to collect analytics and generate reports.
A separate account allows you to distinguish automatic comments from personal ones and simplifies access management.
Step 2: Grant Access
Add the service account to Azure DevOps projects with the Contributor or Project Administrator role.
Step 3: Create Personal Access Token
- Log in to the service account
- Click on the user icon → Personal access tokens
- Click New Token
- Configure the token:
| Parameter | Value |
|---|---|
| Name | pandev-metrics |
| Organization | Select your organization (or All accessible organizations) |
| Expiration | Custom (1 year recommended) |
- In Scopes, select Custom defined and configure access rights:
| Scope | Access |
|---|---|
| Code | Read |
| Pull Request Threads | Read & Write |
| Work Items | Read |
- Click Create and save the token
The token is displayed only once! Save it in a safe place.
Step 4: Connect in PanDev Metrics
- Go to Settings → Integrations → Azure DevOps
- Enter:
- Organization URL:
https://dev.azure.com/your-organization - Personal Access Token: token from step 3
- Organization URL:
- Click Check Connection
- After successful verification, click Activate
Step 5: Select Projects
- Select projects to monitor
- Configure repository filters (optional)
- Enable/disable automatic PR comments
- Save settings
Tracked Metrics
- Commits — number and frequency of commits by developers
- Pull Requests — PR cycle time, time to merge, number of revisions
- Code Review — review time, number of comments
- Pipelines — build activity, execution time
- Work Items — linking tasks to commits and PRs
FAQ
Does integration work with Azure DevOps Server? Yes, both Azure DevOps Services and Server (On-Premise) versions are supported.
Can I limit integration to specific projects? Yes, at the project selection stage, you can select only the ones you need.
How to link Work Items with metrics?
If Work Items: Read scope is available, metrics are automatically linked to tasks via numbers in commit messages and PRs.