A VS Code extension for reviewing and managing Azure DevOps pull requests directly within the editor, with special support for markdown preview and comment overlay.
Attribution: This extension is inspired by and based on the architecture of GitHub Pull Requests and Issues by Microsoft, adapted for Azure DevOps workflows.
Features
Activity Bar Integration
Dedicated sidebar with Azure DevOps icon in the activity bar
Pull Requests view showing all PRs for your repository
Active PR view displaying the currently selected pull request
Changed Files view listing all files modified in the PR
PR Description view with rendered markdown description
Pull Request Management
Browse pull requests directly from the sidebar
Checkout PRs to your local branch with one click
Open PRs in browser for full Azure DevOps experience
View file diffs for any changed file in the PR
Markdown Preview with Comments
Rendered markdown preview with live comment overlay
Comment markers displayed inline at the source lines where comments were made
Click markers to view full comment threads
Text selection to add new comments on specific lines
Mermaid diagram support including ADO's :::mermaid syntax
Toggle between diff and preview modes for markdown files
Native VS Code Comment Integration
Comment threads displayed using VS Code's native comment UI
Create, edit, and delete comments directly in the editor
Resolve and reopen comment threads
Auto-refresh comments at configurable intervals (default: 15 seconds) with incremental updates that avoid visual flicker
@mention resolution — @<GUID> mentions in comments are resolved to display names in both diff and preview views using a three-tier lookup (identity cache → thread-level identities → ADO API)
Insert @Mention — search for team members by name and insert formatted mentions into comments
Azure DevOps Integration
Microsoft OAuth authentication using VS Code's built-in Microsoft authentication provider
Automatic token management with caching and refresh handled by VS Code
Automatic remote detection for Azure DevOps repositories
Branch-based PR detection automatically finds active PRs for your current branch
Getting Started
Prerequisites
VS Code 1.85.0 or higher
Git extension enabled
Azure DevOps repository with configured remote
Installation
Install the extension from the VS Code Marketplace (or build from source)
Open a workspace with an Azure DevOps repository
Authentication
Run the command ADO: Sign In to Azure DevOps
Sign in with your Microsoft account when prompted
The extension uses VS Code's built-in Microsoft authentication
Your Azure DevOps organization must be linked to your Microsoft account
Usage
Click the Azure DevOps icon in the activity bar to open the sidebar
Sign in with your Microsoft account when prompted
Browse and select a pull request from the list
Use the Changed Files view to navigate modified files
Open markdown files to see the preview with comment overlay
Click comment markers to view threads, or select text to add new comments
Commands
Authentication
Command
Description
ADO: Sign In to Azure DevOps
Authenticate with your Microsoft account
ADO: Sign Out from Azure DevOps
Sign out and optionally remove Microsoft account
Pull Request Management
Command
Description
ADO: Refresh Pull Requests
Refresh the pull requests list
ADO: Checkout Pull Request
Checkout the selected PR branch locally
ADO: Open in Browser
Open the PR in Azure DevOps web interface
ADO: Open PR Description
View the pull request description
ADO: Refresh Changed Files
Refresh the list of changed files
ADO: Open File Diff
Open diff view for a changed file
Markdown Preview
Command
Description
ADO: Open Markdown Preview with Comments
Open markdown preview with comment overlay
ADO: Toggle Diff/Preview View
Switch between diff and preview modes
ADO: Refresh Comments
Refresh comment threads from ADO
ADO: Add Comment
Add a new comment (select text first)
Comment Thread Management
Command
Description
ADO: Submit Comment
Submit a new comment to the thread
ADO: Edit Comment
Edit an existing comment
ADO: Delete Comment
Delete a comment
ADO: Resolve Thread
Mark a comment thread as resolved
ADO: Reopen Thread
Reopen a resolved comment thread
ADO: Insert @Mention
Search for and insert an @mention for a team member
Style for displaying comment markers (inline or gutter)
"inline"
adoPrMarkdown.commentRefreshInterval
Auto-refresh interval for PR comments in seconds (0 to disable)
15
Development
Building from Source
# Clone the repository
git clone <repository-url>
cd vscode-ado-pull-request
# Install dependencies
npm install
# Build
npm run compile
# Watch mode for development
npm run watch
# Lint the code
npm run lint
Available Scripts
Script
Description
npm run compile
Compile TypeScript to JavaScript
npm run watch
Watch mode - recompile on file changes
npm run lint
Run ESLint on source files
npm test
Run unit tests with Jest
npm run test:coverage
Run tests with coverage report
npm run vscode:prepublish
Prepare extension for publishing
Running in Debug Mode
Open the project in VS Code
Press F5 to launch the Extension Development Host
Open a workspace with an Azure DevOps repository to test
Acknowledgements
This extension is based on the architecture and design patterns of GitHub Pull Requests and Issues by Microsoft, adapted to work with Azure DevOps repositories and APIs. We gratefully acknowledge the foundational work of the original project.
License
MIT - see LICENSE file for details.
Contributing
Contributions are welcome! Please read the contributing guidelines before submitting pull requests.