AI assistant tracking for Pull Requests. Adds 'ai-code-assistant' labels, 'ai.code.assistant' properties, and 'ai-code-assistant-status' checks. Enforces declarations on main branches.
A comprehensive Azure DevOps extension that enables transparent tracking and compliance management of AI coding assistant usage in Pull Requests. Automatically manages labels, custom properties, and status checks to ensure policy adherence across development teams.
✨ Key Features
🏷️ Automatic Label Management
Adds the ai-code-assistant label when AI assistant usage is confirmed
Removes the label when manual development is declared
Enables easy filtering and search of AI-assisted Pull Requests
⚡ Status Check Integration
Createsai-code-assistant-status checks for branch policy enforcement
States:
✅ succeeded - When usage is properly declared (Yes/No)
⏳ pending - When declaration is still undefined
Integrates seamlessly with Azure DevOps branch protection policies
📊 Custom Properties Storage
Stores declarations in ai.code.assistant PR property
Maintains complete audit trail for compliance reporting
Enables API-based queries for organizational analytics
🎯 Smart Branch Targeting
Enforces declarations only on main branches (develop, master, main)
Shows informational interface for feature branches
Reduces unnecessary overhead on development workflows
� Compliance & Governance
Mandatory declarations on protected branches
Transparent tracking for code review processes
Audit-ready data for organizational compliance
🚀 How to Use
For Developers
Create/Open a Pull Request targeting main branches
Navigate to the "GitHub Copilot Declaration" tab
Select your declaration:
✅ Yes, I used GitHub Copilot or any AI coding assistant
❌ No, I wrote all the code manually
🔄 Not specified yet (prompts for completion)
For DevOps Engineers
Branch Policy Configuration
# Add status check requirement in Azure DevOps:
Status Check Name: ai-code-assistant-status
Required: Yes
Build Definition: Not applicable (generated by extension)
API Integration Examples
# Query PRs with AI assistance
GET /repos/{repo}/pulls?labels=ai-code-assistant
# Get declaration property
GET /repos/{repo}/pulls/{pr}/properties/ai.code.assistant
📈 Benefits for Organizations
🔍 Development Transparency
Clear visibility into AI tool adoption across teams
// Enforcement applies to these branches:
const PROTECTED_BRANCHES = [
"refs/heads/develop",
"refs/heads/master",
"refs/heads/main"
];
📋 Installation & Setup
Prerequisites
Azure DevOps Services or Server 2019+
Project Collection Administrator permissions
vso.code and vso.code_status scopes
Installation Steps
Contact your Azure DevOps Administrator
Request installation of "AI Code Assistant Declaration" extension
Configure branch policies if automated enforcement is desired
Communicate new process to development teams
🤝 Support & Troubleshooting
Common Issues
Extension not visible: Check project permissions and extension installation
Status checks not appearing: Verify vso.code_status scope is enabled
Labels not updating: Confirm PR is targeting protected branches
Getting Help
Technical Support: Contact your organization's DevOps team
Feature Requests: Submit through your organization's internal channels
Documentation: Refer to Azure DevOps Extension documentation
🔄 Version History
v1.0.23: Current stable release with full feature set
Enhanced UI with responsive design and accessibility improvements
Optimized performance and reduced bundle size
📝 Note: This extension is designed for organizational transparency and compliance. All declarations are voluntary but may be required by organizational policies on protected branches.