Add Azure DevOps plugin support (azuredevops_go)#137
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the CLI documentation for gh devlake configure connection and gh devlake configure scope add to include Azure DevOps (azuredevops_go) usage, including examples and an explanation of the Azure DevOps scoping flow.
Changes:
- Add
azuredevops_goto the documented--pluginoptions for connection and scope commands. - Document Azure DevOps token env vars and add Azure DevOps connection/scope examples.
- Add an Azure DevOps “What It Does” section describing the interactive project/repo picker behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| docs/configure-scope.md | Adds Azure DevOps to plugin list, provides an Azure DevOps example, and documents the Azure DevOps interactive scoping flow. |
| docs/configure-connection.md | Adds Azure DevOps to plugin list, documents PAT env vars, adds Azure DevOps examples, and lists Azure DevOps PAT scopes. |
docs/configure-connection.md
Outdated
| | Flag | Default | Description | | ||
| |------|---------|-------------| | ||
| | `--plugin` | *(interactive)* | Plugin to configure (`github`, `gh-copilot`, `jenkins`) | | ||
| | `--plugin` | *(interactive)* | Plugin to configure (`github`, `gh-copilot`, `jenkins`, `azuredevops_go`) | |
There was a problem hiding this comment.
The plugin slug list here looks incomplete vs the actual CLI: availablePluginSlugs() is derived from AvailableConnections() and currently includes additional plugins (e.g., gitlab, bitbucket, jira, sonarqube) beyond the four listed. Please update this list (and any similar lists in this doc) to reflect all supported/available plugins so users aren’t misled.
docs/configure-connection.md
Outdated
| |------|---------|-------------| | ||
| | `--plugin` | *(interactive)* | Plugin to configure (`github`, `gh-copilot`, `jenkins`) | | ||
| | `--plugin` | *(interactive)* | Plugin to configure (`github`, `gh-copilot`, `jenkins`, `azuredevops_go`) | | ||
| | `--org` | *(required for Copilot)* | GitHub organization slug | |
There was a problem hiding this comment.
--org is documented as “(required for Copilot)” and “GitHub organization slug”, but the code also requires --org for some non-Copilot plugins (e.g., Azure DevOps has NeedsOrg: true) and the meaning differs by plugin. Consider making this description plugin-neutral (and call out Azure DevOps org explicitly) to avoid confusion.
| | `--org` | *(required for Copilot)* | GitHub organization slug | | |
| | `--org` | *(plugin-dependent)* | Organization identifier. For GitHub/Copilot: GitHub organization slug. For Azure DevOps: Azure DevOps organization name (required when configuring Azure DevOps connections). | |
docs/configure-connection.md
Outdated
| | `gh-copilot` | `manage_billing:copilot`, `read:org` | | ||
| | `gh-copilot` (enterprise metrics) | + `read:enterprise` | | ||
| | `jenkins` | Username + API token/password (BasicAuth) | | ||
| | `azuredevops_go` | `vso.code`, `vso.build`, `vso.release` | |
There was a problem hiding this comment.
This doc states Azure DevOps requires PAT scopes vso.code, vso.build, vso.release, but the current connection registry defines RequiredScopes/ScopeHint as empty for azuredevops_go (and tests assert that). Either update the docs to reflect that the CLI doesn’t currently surface required scopes for Azure DevOps, or update the registry/tests so the CLI shows these scopes consistently.
| | `azuredevops_go` | `vso.code`, `vso.build`, `vso.release` | | |
| | `azuredevops_go` | Azure DevOps PAT (scopes are configured in Azure DevOps; the CLI does not currently validate scopes) | |
docs/configure-scope.md
Outdated
| | Flag | Default | Description | | ||
| |------|---------|-------------| | ||
| | `--plugin` | *(interactive or required)* | Plugin to configure (`github`, `gh-copilot`, `jenkins`) | | ||
| | `--plugin` | *(interactive or required)* | Plugin to configure (`github`, `gh-copilot`, `jenkins`, `azuredevops_go`) | |
There was a problem hiding this comment.
The plugin slug list here appears incomplete vs the actual CLI: availablePluginSlugs() comes from AvailableConnections() and includes more than the four listed (e.g., gitlab, bitbucket, jira, sonarqube). If this table is meant to enumerate supported plugins, please update it accordingly (and consider mentioning the supported alias azure-devops for azuredevops_go).
| | `--plugin` | *(interactive or required)* | Plugin to configure (`github`, `gh-copilot`, `jenkins`, `azuredevops_go`) | | |
| | `--plugin` | *(interactive or required)* | Plugin to configure (e.g., `github`, `gh-copilot`, `jenkins`, `gitlab`, `bitbucket`, `jira`, `sonarqube`, `azuredevops_go` / alias `azure-devops`) | |
docs/configure-scope.md
Outdated
| | `--plugin` | *(interactive or required)* | Plugin to configure (`github`, `gh-copilot`, `jenkins`, `azuredevops_go`) | | ||
| | `--connection-id` | *(auto-detected)* | Override the connection ID to scope | | ||
| | `--org` | *(required)* | GitHub organization slug | | ||
| | `--enterprise` | | Enterprise slug (enables enterprise-level Copilot metrics) | |
There was a problem hiding this comment.
--org is described as “GitHub organization slug”, but this command reuses --org for other plugins too (e.g., Azure DevOps organization; GitLab group path). Please make the --org flag description plugin-neutral and/or clarify that its meaning depends on --plugin (you already add an Azure DevOps-specific note later, but the flags table is still GitHub-specific).
|
@copilot Please address the five review comments on this PR: make the documented plugin slug lists complete/current, make |
Addressed in commit 10aa051:
|
ewega
left a comment
There was a problem hiding this comment.
Reviewed after follow-up fixes; safe to merge.
ewega
left a comment
There was a problem hiding this comment.
Reviewed after follow-up fixes; safe to merge.
|
@copilot This PR is now merge-conflicted after recent merges. Please rebase/update it onto latest main, resolve the doc overlaps cleanly, rerun checks, and keep the Azure DevOps doc corrections intact. |
Done in commit 2037401. The conflict was in |
2037401 to
eadffd1
Compare
Adds Azure DevOps as a fully available plugin in the CLI, covering connection creation, interactive org/project/repo scope selection, and PAT resolution.
Registry (
cmd/connection_types.go)azuredevops_goentry set toAvailable: truewithNeedsOrg,SupportsTest,AuthMethod: "AccessToken",HasRepoScopes: true,ScopeIDField: "id", and PAT env keysAZURE_DEVOPS_PAT/AZDO_PATFindConnectionDefmaps legacy alias"azure-devops"→"azuredevops_go"Scope handler (
cmd/configure_scopes.go)scopeAzureDevOpsHandlerwalks the org → project → repo hierarchy via the DevLake remote-scope APIclient.PutScopes("azuredevops_go", …)Tests
TestAzureDevOpsRegistryEntry— validates allConnectionDeffieldsTestSelectPlugin_AzureDevOpsAlias— verifies"azure-devops"alias resolves to"azuredevops_go"TestAzureDevOpsScopePayload_*— scope payload construction edge casesDocs
configure-connection.md:azuredevops_goadded to--pluginflag, PAT scopes table (vso.code,vso.build,vso.release), token resolution keys, and connection examplesconfigure-scope.md: added to--pluginflag, scope add example, and "What It Does (Azure DevOps)" section covering the two-level project → repo selection flow📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.