Azure DevOps Pull Request

kind: azuredevops/pullrequest

Description

The actions section describes the Azure DevOps Pull Requests that Updatecli is expected to open (or update) when the manifest is applied.

The azuredevops/pullrequest action is typically paired with an azuredevops or azuredevopssearch SCM block. Updatecli will create or update a pull request from the working branch to the target branch whenever a target produces a change.

Parameters

NameTypeDescriptionRequired
bodystring“body” defines a custom pull request body.
draftboolean“draft” defines if the pull request should be created as draft.
organizationstringOrganization defines the Azure DevOps organization URL to interact with.
projectstring“project” defines the Azure DevOps project containing the repository.
repositorystring“repository” defines the Azure DevOps repository name.
sourcebranchstring“sourcebranch” defines the source branch used to create the pull request.
targetbranchstring“targetbranch” defines the target branch used to create the pull request.
titlestring“title” defines the pull request title.
tokenstring“token” specifies the personal access token used to authenticate with Azure DevOps.
urlstring“url” defines the Azure DevOps organization URL to interact with.
usernamestring“username” defines the username used for git authentication.

Example

# updatecli.yaml
name: Update a file and open an Azure DevOps Pull Request

scms:
  default:
    kind: azuredevops
    spec:
      organization: myorg
      project: myproject
      repository: myrepo
      branch: main
      token: '{{ requiredEnv "UPDATECLI_AZURE_DEVOPS_TOKEN" }}'
      username: '{{ requiredEnv "UPDATECLI_AZURE_DEVOPS_USERNAME" }}'
      user: updatecli
      email: updatecli@example.com

sources:
  golang:
    name: Get the latest Golang version
    kind: golang
    spec:
      versionfilter:
        kind: semver
        pattern: "1.24.x"

targets:
  golang-version:
    name: 'deps(golang): Bump Golang version to {{ source "golang" }}'
    kind: yaml
    scmid: default
    spec:
      file: .github/workflows/*.yaml
      key: '$.jobs.build.steps[?(@.uses =~ /^actions\/setup-go/)].with.go-version'
      searchpattern: true

actions:
  default:
    kind: azuredevops/pullrequest
    scmid: default
    spec:
      title: 'deps(golang): Bump Golang version'
Top