Azure DevOps Pull Request
kind: azuredevops/pullrequest
On this page
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
| Name | Type | Description | Required |
|---|---|---|---|
| body | string | “body” defines a custom pull request body. | |
| draft | boolean | “draft” defines if the pull request should be created as draft. | |
| organization | string | Organization defines the Azure DevOps organization URL to interact with. | |
| project | string | “project” defines the Azure DevOps project containing the repository. | |
| repository | string | “repository” defines the Azure DevOps repository name. | |
| sourcebranch | string | “sourcebranch” defines the source branch used to create the pull request. | |
| targetbranch | string | “targetbranch” defines the target branch used to create the pull request. | |
| title | string | “title” defines the pull request title. | |
| token | string | “token” specifies the personal access token used to authenticate with Azure DevOps. | |
| url | string | “url” defines the Azure DevOps organization URL to interact with. | |
| username | string | “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'