Skip to content

feat: add azure devops support#8586

Merged
olblak merged 36 commits into
updatecli:mainfrom
olblak:issue/7090
May 14, 2026
Merged

feat: add azure devops support#8586
olblak merged 36 commits into
updatecli:mainfrom
olblak:issue/7090

Conversation

@olblak

@olblak olblak commented Apr 24, 2026

Copy link
Copy Markdown
Member

Fix #7090

This pull request introduces support for Azure DevOps.

  • The scm kind azuredevops can now be used to interact with Azure DevOps repositories.
  • The scm kind azuredevopssearch is a special scm plugin that allows to interact with all Azure DevOps repositories from an organization matching specific regex rules.
  • The action of kind azuredevops/pullrequest can be used to automatically open pull request on a Azure DevOps repository. This action is compatible with the scm of kind azuredevops and azuredevopssearch

When a scm is specified then Updatecli clone the repository in a temporary location and run all git operation from there.

Credentials

Credentials can be specified either using the spec parameter username and token, or using the environment variable
UPDATECLI_AZURE_DEVOPS_USERNAME and UPDATECLI_AZURE_DEVOPS_TOKEN. The token must be a Personal Access Token (PAT) with the appropriate permissions to access the repositories and create pull requests.
If the environment variable is specified, then it overrides the credentials specified in the spec parameters.

Examples

Azure DevOps repository

scms:
  default:
    kind: azuredevops
    spec:
      organization: updatecli
      project: "updatecli"
      repository: "updatecli-test"
      branch: main
      username: xxx
      token: yyy
actions:
  default:
    kind: azuredevops/pullrequest
    scmid: default

Azure DevOps Search

scms:
  azuredevops:
    kind: azuredevopssearch
    spec:
      organization: updatecli
      #project: ".*" # Optional
      #repository: ".*" # Optional
      branch: "^main$"
      username: xxx
      token: yyy

actions:
  default:
    kind: azuredevops/pullrequest
    scmid: azuredevops

Test

To test this pull request, you can run the following commands:

cd <to_package_directory>
go test

Additional Information

Checklist

  • I have updated the documentation via pull request in website repository.

Tradeoff

Potential improvement

Signed-off-by: Olblak <me@olblak.com>
@olblak olblak added enhancement New feature or request scm-azuredevops labels Apr 24, 2026
@olblak olblak marked this pull request as draft April 24, 2026 20:20
olblak added 6 commits April 25, 2026 10:02
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
@olblak olblak marked this pull request as ready for review April 26, 2026 12:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class Azure DevOps support to Updatecli by introducing an Azure DevOps SCM implementation, an azuredevopssearch SCM for repository/branch discovery, and an Azure DevOps pull request action, then wires them into the pipeline engine, JSON schema generation, scaffolding templates, and e2e configs.

Changes:

  • Introduce Azure DevOps SCM (azuredevops) plus summary helpers/tests.
  • Add Azure DevOps repo/branch discovery SCM (azuredevopssearch) with generator + tests.
  • Add Azure DevOps pull request action/resource implementation (create/exist/clean) with tests, and integrate into engine/pipeline/schema/scaffold/e2e.

Reviewed changes

Copilot reviewed 28 out of 29 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
pkg/plugins/scms/azuredevopssearch/main.go New azuredevopssearch SCM constructor and client wiring
pkg/plugins/scms/azuredevopssearch/spec.go azuredevopssearch spec definition + validation/sanitization
pkg/plugins/scms/azuredevopssearch/specGenerator.go Project/repo/branch discovery and spec generation
pkg/plugins/scms/azuredevopssearch/description.go Summary output for azuredevopssearch
pkg/plugins/scms/azuredevopssearch/main_test.go Tests for defaults/sanitization and invalid regex
pkg/plugins/scms/azuredevopssearch/specGenerator_test.go Tests for discovery behavior and limits
pkg/plugins/scms/azuredevops/main.go Azure DevOps SCM implementation (clone/checkout/commit/push/etc.)
pkg/plugins/scms/azuredevops/summary.go Summary formatting for Azure DevOps SCM
pkg/plugins/scms/azuredevops/summary_test.go Tests for summary formatting (incl. URL credentials stripping)
pkg/plugins/resources/azuredevops/client/main.go Azure DevOps API client (PAT connection + core/git clients)
pkg/plugins/resources/azuredevops/client/spec.go Azure DevOps client spec + URL helpers (GitURL / PullRequestURL)
pkg/plugins/resources/azuredevops/pullrequest/main.go Azure DevOps pull request action constructor + SCM inheritance
pkg/plugins/resources/azuredevops/pullrequest/spec.go Pull request action spec definition
pkg/plugins/resources/azuredevops/pullrequest/utils.go PR/branch helper logic (find PR, ref lookup, iteration checks)
pkg/plugins/resources/azuredevops/pullrequest/exist.go Action “exist” check implementation
pkg/plugins/resources/azuredevops/pullrequest/create.go PR create/update implementation and body generation
pkg/plugins/resources/azuredevops/pullrequest/clean.go Cleanup logic (close empty PRs)
pkg/plugins/resources/azuredevops/pullrequest/main_test.go Tests for action constructor + refName helper
pkg/plugins/resources/azuredevops/pullrequest/create_test.go Tests for PR body generation/merge behavior
pkg/plugins/resources/azuredevops/pullrequest/clean_test.go Tests for PR cleanup helpers (iterations/refs/head-match retry)
pkg/core/pipeline/scm/main.go Register azuredevops SCM and azuredevopssearch kind handling
pkg/core/pipeline/scm/config.go Include Azure DevOps kinds in SCM JSON schema “oneOf”
pkg/core/engine/configuration.go Expand azuredevopssearch into multiple concrete SCM pipelines
pkg/core/pipeline/action/main.go Register azuredevops/pullrequest action handler + JSON schema
pkg/core/pipeline/action/main_test.go Add validation test case for azuredevops action kind normalization
pkg/core/scaffold/assets/updatecli.d/_scm.azuredevops.yaml Add scaffold partial for Azure DevOps SCM + PR action
e2e/updatecli.d/success.d/azuredevops/scm.yaml Add e2e pipeline manifest for Azure DevOps SCM + PR action
go.mod Add Azure DevOps Go SDK dependencies
go.sum Dependency checksum updates

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/core/scaffold/assets/updatecli.d/_scm.azuredevops.yaml
Comment thread pkg/plugins/resources/azuredevops/pullrequest/utils.go Outdated
Comment thread e2e/updatecli.d/success.d/azuredevops/scm.yaml Outdated
Comment thread go.mod Outdated
Comment thread pkg/plugins/scms/azuredevopssearch/spec.go Outdated
Comment thread pkg/plugins/scms/azuredevopssearch/spec.go Outdated
Comment thread pkg/plugins/resources/azuredevops/pullrequest/create.go
Comment thread pkg/core/pipeline/action/main.go
Comment thread pkg/plugins/scms/azuredevopssearch/main.go
Comment thread pkg/plugins/scms/azuredevops/main.go
olblak and others added 6 commits April 26, 2026 14:27
Signed-off-by: Olblak <me@olblak.com>
Don't make project and repository required on the client creation

Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 28 out of 29 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/plugins/scms/azuredevops/main.go
Comment thread pkg/core/pipeline/action/main.go
Comment thread pkg/plugins/resources/azuredevops/client/spec.go
Comment thread e2e/updatecli.d/success.d/azuredevops/scm.yaml Outdated
Comment thread e2e/updatecli.d/success.d/azuredevops/scm.yaml Outdated
olblak added 2 commits May 6, 2026 22:08
Signed-off-by: Olblak <me@olblak.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 29 out of 30 changed files in this pull request and generated 5 comments.

Comment thread pkg/plugins/resources/azuredevops/pullrequest/create_test.go
Comment thread pkg/core/scaffold/assets/updatecli.d/_scm.azuredevops.yaml
Comment thread pkg/plugins/scms/azuredevops/main.go
Comment thread pkg/plugins/scms/azuredevopssearch/spec.go
Comment thread pkg/plugins/resources/azuredevops/client/spec.go
olblak added 2 commits May 13, 2026 09:19
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
@olblak olblak merged commit 742b26f into updatecli:main May 14, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request scm-azuredevops

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Support Azure DevOps SCM/Action

2 participants