Azure DevOps Integration
Comprehensive Azure DevOps integration for pull requests and work items.
Overview
C# Dev Tools integrates with Azure DevOps, providing pull request management and collaboration features.
Setup
Connecting to Azure DevOps
- Open Command Palette (
Ctrl+Shift+P
) - Type "Pull Request Manager: Open Connection Manager"
- Click "Add Connection"
- Select "Azure DevOps"
- Enter:
- Organization name
- Project name
- Personal Access Token
- Save connection
Creating a Personal Access Token
- Go to Azure DevOps → User Settings → Personal Access Tokens
- Click "New Token"
- Set scopes:
Code (Read, write, & manage)
Work Items (Read & write)
- Create and copy token
Viewing Pull Requests
Organization and Project
Pull requests are organized by:
- Organization
- Project
- Repository
Filter Options
View PRs by:
- Assigned to me
- Created by me
- Review requested
- All pull requests
Creating Pull Requests
From Azure DevOps
Create PR in Azure DevOps:
- Push branch to Azure Repos
- Click "Create Pull Request"
- Fill in:
- Title
- Description
- Target branch
- Reviewers
- Work items (optional)
- Create PR
Linking Work Items
Link related work items:
- Search for work items
- Select items to link
- PR is associated with work items
- Work items show PR link
Reviewing Pull Requests
PR Details
View comprehensive PR information:
- Title and description
- Source and target branches
- Changed files and commits
- Comments and discussions
- Review status
- Build and pipeline status
- Linked work items
Code Review
Review code changes:
- View file diffs
- Add inline comments
- Reply to discussions
- Approve or wait for author
Review Votes
Azure DevOps voting system:
- Approve: PR looks good
- Approve with suggestions: Minor changes suggested
- Wait for Author: Changes requested
- Reject: Major issues found
Merging Pull Requests
Merge Types
Azure DevOps supports:
- Merge (no fast-forward): Standard merge
- Squash commit: Single commit
- Rebase and fast-forward: Linear history
- Semi-linear merge: Merge with rebase
Merge Policies
Respect policies:
- Minimum number of reviewers
- Required reviewers
- Build validation
- Work item linking
- Comment resolution
Build Integration
View build status:
- Pipeline results
- Build checks
- Test results
- Quality gates
Work Items
Manage associated work items:
- View linked items
- Update work item status
- Add new work items
- Complete items with PR merge
Azure-Specific Features
Branch Policies
Respect configured policies:
- Required reviewers
- Build validation
- Work item linking
- Comment resolution
- Merge strategy
Permissions
Permission-based features:
- View: Read pull requests
- Contribute: Create and comment
- Complete: Merge pull requests
- Admin: Policy management
Best Practices
- Link work items to PRs
- Follow branch policies
- Use appropriate merge types
- Complete work items with merge
- Ensure builds pass before merge
- Resolve all comments
Troubleshooting
Authentication Failed
If Azure DevOps auth fails:
- Verify organization name is correct
- Check project name
- Verify PAT permissions
- Regenerate token if expired
PRs Not Loading
If PRs don't appear:
- Check organization access
- Verify project permissions
- Refresh PR list
- Check network connectivity
Can't Merge PR
If merge fails:
- Check branch policies
- Ensure all checks pass
- Verify reviewer approvals
- Resolve all comments
- Check permissions