Skip to content

Feature Request: Azure DevOps Integration #2297

Closed

Description

@kjjuno

Feature Request: Azure DevOps Integration

Summary

Request to add Azure DevOps integration similar to the existing GitHub integration, allowing opencode to be used within Azure DevOps work items, pull requests, and comments.

Background

opencode currently has excellent GitHub integration that allows users to:

  • Mention /opencode or /oc in GitHub comments
  • Execute tasks within GitHub Actions runners
  • Triage issues, fix bugs, and implement features
  • Create branches and submit PRs automatically
  • Run securely within the repository's CI/CD environment

This same functionality would be incredibly valuable for Azure DevOps users.

Proposed Features

Core Integration

  • Comment Triggers: Support /opencode or /oc mentions in:
    • Work item comments
    • Pull request comments
    • Board discussions
  • Pipeline Integration: Execute opencode tasks within Azure Pipelines
  • Secure Execution: Run within Azure DevOps hosted agents or self-hosted agents

Specific Use Cases

  • Triage Work Items: Ask opencode to analyze and explain work items, bugs, or user stories
  • Fix and Implement: Request opencode to fix issues or implement features, creating new branches and PRs
  • Code Review: Have opencode review PRs and make suggested changes
  • Documentation: Generate or update documentation based on code changes

Installation & Setup

Similar to GitHub installation, provide:

  • Azure DevOps extension/service connection setup
  • Pipeline template (.azure-pipelines/opencode.yml)
  • Configuration for API keys and permissions
  • CLI command like opencode azuredevops install

Configuration Options

  • model: AI model to use (same as GitHub integration)
  • share: Whether to share opencode sessions
  • token: Azure DevOps personal access token or service principal
  • organization: Azure DevOps organization URL
  • project: Target project (optional, can be inferred)

Example Usage

# .azure-pipelines/opencode.yml
trigger: none

pool:
  vmImage: 'ubuntu-latest'

variables:
  - group: opencode-secrets

steps:
  - checkout: self
    fetchDepth: 1

  - task: opencode@1
    inputs:
      model: 'anthropic/claude-sonnet-4-20250514'
      token: $(AZURE_DEVOPS_TOKEN)
    env:
      ANTHROPIC_API_KEY: $(ANTHROPIC_API_KEY)

Example Comments

  • In a work item: /opencode explain this bug and suggest a fix
  • In a PR: /oc review this code and check for security issues
  • In a feature request: /opencode implement this feature in a new branch

Technical Considerations

Azure DevOps API Integration

  • Work with Azure DevOps REST APIs for:
    • Work items
    • Pull requests
    • Git repositories
    • Comments and discussions
    • Pipeline triggers

Authentication

  • Support for Personal Access Tokens (PAT)
  • Service Principal authentication
  • Managed Identity for Azure-hosted scenarios

Permissions

Required permissions for the service account:

  • Code (read/write)
  • Work items (read/write)
  • Pull requests (read/write)
  • Build (execute)

Benefits

  • Brings opencode's powerful AI capabilities to Azure DevOps users
  • Maintains consistency with existing GitHub workflow
  • Leverages Azure DevOps' enterprise security and compliance features
  • Enables AI-assisted development in Microsoft-centric environments

Implementation Scope

This could be implemented as:

  1. New Azure DevOps marketplace extension
  2. Additional provider in the existing opencode CLI
  3. Azure Pipelines task/extension
  4. Combination of the above

The implementation should mirror the GitHub integration as closely as possible while respecting Azure DevOps' unique features and constraints.

Activity

  1. abdidaudpropel commented on Sep 23, 2025

    @abdidaudpropel

    Great to see this moving; any eta on v1 of this support? The list of features is great but would be best if a basic PR reviewer of the code is there respecting AGENTS.md.

    Let us know if want the community to contribute to this integration to push this forward

  2. rekram1-node commented on Dec 28, 2025

    @rekram1-node
    Contributor

    [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

  3. trojanmartin commented on Mar 12, 2026

    @trojanmartin

    Hi, I have created an Azure DevOps extension: https://marketplace.visualstudio.com/items?itemName=martin-trojan.OpenCodeAgent

    It is ready to use as an AI code review tool. However, with minor adjustments, you can run it using PR comments, just like the native opencode GitHub integration. It's able to make changes in the pr and then commit them. It's also can be used to ask questions about code/pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions