Azure DevOps
Copy page
Azure DevOps
This guide covers Azure DevOps Services and Azure DevOps Server.
Prerequisites
You need to be an administrator of the Azure DevOps organisation you want to connect to Hacktron. The role is required to create a personal access token with the scopes Hacktron uses to read code, post pull request statuses, and register the service hooks that trigger reviews.
Configure access
Open personal access tokens
In Azure DevOps, open User settings (the icon next to your avatar at the top right) and select Personal access tokens.


Personal access tokens in Azure DevOps user settings
Create a token
Click New Token. Give it a descriptive name, such as “Hacktron”, and select the organisation you want to connect.


Create a new personal access token in Azure DevOps, named Hacktron
Warning
Personal access tokens have expiration dates. Set the expiration to cover the time you intend to use Hacktron, to avoid a service interruption.
Grant the required scopes
Switch the scope selector to Show all scopes and grant these:
| Scope | Permissions |
|---|---|
| Code | Read & write and Status |
| Project and Team | Read |
| Service Connections | Read, query & manage |
| Identity | Read |
Note
The Read & write Code scope lets Hacktron clone repositories and post review comments, and Status lets it report pull request check results. The Service Connections scope lets Hacktron register the service hooks that notify it when a pull request is opened or updated, so reviews run automatically. Hacktron keeps no source code once each review is complete.


The Hacktron token in Azure DevOps with its granted scopes
Click Create, then copy the generated token. Azure DevOps shows it only once.


The new token, shown once for you to copy
Open Integrations
In Hacktron, go to Integrations and click Connect under Azure DevOps.


The Azure DevOps row in Hacktron’s Integrations
Enter the token
Enter your organisation URL, such as https://dev.azure.com/acme-engineering, and the token you created, then click Connect Azure DevOps.


Connect Azure DevOps in Hacktron, with the organisation URL and token
Select repositories
Select the repositories Hacktron can access.


Azure DevOps repositories in Hacktron’s integration dialog, with one repository selected
Hacktron then has organisation-level access to the selected repositories.
Link member accounts for pull request attribution
The organisation-level connection lets Hacktron access repositories and receive pull request events. Members who author Azure DevOps pull requests should also link their Microsoft account, so Hacktron can attribute those pull requests to the correct Review seat.
Go to Personal settings, find Microsoft under Connected accounts, and select Connect. Sign in with the Microsoft account whose email matches your Azure DevOps user principal name (UPN). Connect Microsoft for Azure DevOps has the account-linking steps and the email requirement.
Linking an account does not rerun completed reviews. Future activity on an existing Azure DevOps pull request can reconcile its author with the linked Hacktron member.
Azure DevOps Server
Hacktron supports self-hosted Azure DevOps Server through the same personal access token flow, with one extra step when you connect.
Follow the steps in Configure access to create a personal access token with the same scopes on your Azure DevOps Server instance. When you open the Connect Azure DevOps modal in Hacktron, select Azure DevOps Server and also enter your instance’s base URL and organisation, such as https://azuredevops.example.com/DefaultCollection.
Note
Self-hosted prerequisites:
Your Azure DevOps Server instance must be reachable from Hacktron over HTTPS with a valid TLS certificate.
The token must carry the same scopes listed above on your Azure DevOps Server instance.