Add an Azure DevOps repo
If your project files are stored in a remote repository on Azure DevOps Services, you can connect that repository, so you can access, edit, and publish those files in Reunite.
To connect an Azure DevOps repository, you must first create a new Personal Access Token for your Azure organization, then enter the connection details in Reunite.
Create a new access token in Azure DevOps
Permissions
Before creating Personal Access Token (PAT) for your user, make sure that they have a correct access right to the desired Azure projects. Redocly recommends putting your user in the Project Administrators
security group for your Azure DevOps project, since this security group has all the needed permissions by default.
(For example, only the Project Administrators
security group has the View subscriptions
and the Edit subscriptions
permissions enabled by default. Redocly needs these permissions to be able to setup service hooks (webhooks) for the Azure project.)
Alternatively, you can put your user in the Project Contributors
security group and add the View subscriptions
and the Edit subscriptions
permissions manually. See Manage permissions with command line tool or Security REST API in Microsoft Azure DevOps documentation for detailed instructions.
PAT scopes
Before you enter the connection details in Redocly, you need to create and copy a new PAT for your account in Azure DevOps. Redocly uses this access token to establish a connection to your repository.
See Create a PAT in Microsoft Azure DevOps documentation for detailed instructions.
You must select an Organization for this PAT. Do not select All accessible organizations.
Also, the PAT you use must have API scopes defined. You can choose the Full access option, or select Custom defined and enable the following specific scopes:
- Code:
Read, write, & manage
andStatus
The following screenshot from Azure DevOps shows the required custom defined scopes:
Reunite requires:
- Code -> Read (
vso.code
) scope for all read operations in Reunite (list of repositories, branches, files, file contents, diffs, list of PRs, etc.). - Code -> Write (
vso.code_write
) scope for all write operations in Reunite (create/update Pull Requests, remove branches, synchronize remote content). - Code -> Manage (
vso.code_manage
) scope for creating new code repositories from Reunite app. - Code -> Status (
vso.code_status
) scope for setting commit and PR statuses (Lint status, Build status, Link checker status, Visual review).
See Scopes in Microsoft Azure DevOps documentation for detailed information about scopes permissions.
Detailed list of all resources that Reunite uses from Azure API and their required scopes:
Resource | Scopes | Description |
---|---|---|
Repositories - List | vso.code | To get repositories list |
Repositories - Get Repository | vso.code | To get repository metadata |
Stats - List | vso.code | To get branch list |
Refs - Update Refs | vso.code | To delete branches |
Items - List | vso.code | To get folders list and PR templates list |
Items - Get | vso.code | To get PR template content |
Commits - Get | vso.code | To get commit details |
Merge Bases - List | vso.code | To find the merge bases of two commits |
Diffs - Get | vso.code | To get diff between commits |
Statuses - List | vso.code , vso.code_status | To get existing commit statuses |
Statuses - Create | vso.code_write , vso.code_status | To set commit statuses (for deployments and scorecards) |
Pull Requests - Get Pull Requests | vso.code | To get pull requests list |
Pull Requests - Get Pull Request | vso.code | To get details about a specific pull request |
Pull Requests - Create | vso.code | To create a new pull request |
Pull Requests - Update | vso.code | To manage existing pull requests (merge, close, reopen, etc.) |
Pull Request Statuses - Create | vso.code_write , vso.code_status | To set pull request statuses |
Policy Configurations - Get | vso.code | To get configurations for merge strategies |
Subscriptions - List | vso.code | To get a list of existing project subscriptions (webhooks) |
Subscriptions - Create | vso.code | To create a new project subscription (webhook) |
Enter the connection details in Reunite
From your project, select Settings > Git hosting > Azure DevOps.
Enter a Credential name that identifies this Azure DevOps connection. For example, "PAT for my ACME organization".
Enter the Access token you saved from the Create a new access token in Azure DevOps step.
Enter the Organization name of the Azure DevOps Services Organization and select Next.
Select your Organization > Repository > Branch.
(Optional) Select the Monorepo folder, if your project files are part of a monorepo, and you want to include only a specific folder from the repository.
Monorepo folderIf you select to only include a specific folder from a monorepo:
- Only files listed in file tree are cloned, no other files are included
- Project builds are started only when branch contains changes to connected folder
- Remote content is allowed to add to connected folder only
Select Next > Connect.
WarningThis step deletes the files currently in the Redocly project and replaces them with the files in Azure DevOps Services.
Related how-tos
- Follow steps to include remote content from a different repository in your project.
- Check out all the ways you can use the Editor in Reunite to create content.
Resources
- Learn more about where you can view feedback and deployment details for projects in Reunite.
- View the different options for configuring your project in the
redocly.yaml
file in the Configuration reference documentation.