Azure DevOps
The Azure DevOps Datasource connects an Azure DevOps Git repository to Cognipeer. Cognipeer fetches all files from the specified branch and indexes their text content, enabling your Peer to answer questions about your codebase, architecture, or documentation stored in Azure Repos.
Use Cases
- Enable developers to ask questions about an Azure-hosted codebase.
- Index wiki files or Markdown documentation stored in Azure Repos.
- Build an internal engineering assistant connected to your company's repositories.
- Support code review and architecture discussions with an AI-powered knowledge base.
Prerequisites
- An Azure DevOps Personal Access Token (PAT) with
Code (Read)scope.
Create one at Azure DevOps → User Settings → Personal Access Tokens. - The following details from your Azure DevOps project:
- Organization: The Azure DevOps organization name (e.g.,
my-org). - Project: The project name (e.g.,
MyProject). - Repository ID: The Git repository name or GUID (visible in the repository URL).
- Reference (optional): Branch name to index (defaults to
main).
- Organization: The Azure DevOps organization name (e.g.,
Setting Up an Azure DevOps Datasource
- Navigate to Datasources and click Add Datasource.
- Select Azure DevOps as the datasource type.
- Fill in:
- Organization: Your Azure DevOps organization.
- Project: The project containing the repository.
- Repository ID: The repository name or GUID.
- Access Token: Your PAT with Code (Read) scope.
- Reference (optional): Branch to index (defaults to
main).
- Click Save.
- Click Sync to start indexing.
What Gets Indexed
Cognipeer calls the Azure DevOps REST API (/_apis/git/repositories/{repo}/items) with recursionLevel=Full to retrieve all files in the repository tree. Up to 5,000 text-based files are processed. Binary files are automatically excluded. Supported file types include:
- Source code (any language)
- Markdown and plain text documentation
- JSON, YAML, TOML configuration files
Keeping the Datasource Up to Date
The datasource does not auto-sync on new commits. To update:
- Click Sync in the datasource settings.
- For automated sync workflows from Azure Pipelines or webhooks, use the Developer Hub.
Best Practices
- Use PATs with the minimum required scope (
Code: Readonly). - Set PAT expiry and update the datasource credential before expiration.
- For large monorepos, focus indexing on documentation-heavy directories by creating multiple datasources.
Limitations
- Maximum 5,000 files per sync.
- Only text-based and document files are indexed.
- The datasource uses the Azure DevOps REST API v7.0 and requires a valid PAT.

