Bitbucket Cloud Pull Request
kind: bitbucket/pullrequest
On this page
Description
The action
section describes the Bitbucket Cloud Pull Request that updatecli is expected to open (or update) when a target is modified.
Parameters
Name | Type | Description | Required |
---|---|---|---|
body | string | Body defines the Bitbucket pullrequest body | |
owner | string | Owner specifies repository owner | |
password | string | “password” specifies the credential used to authenticate with Bitbucket Cloud API, it must be combined with “username” The “password” should be app password with “pullrequest:write” scope. “token” and “password” are mutually exclusive remark: A password is a sensitive information, it’s recommended to not set this value directly in the configuration file but to use an environment variable or a SOPS file. The value can be set to
https://github.com/getsops/sops | |
repository | string | Repository specifies the name of a repository for a specific owner | |
sourcebranch | string | SourceBranch specifies the pullrequest source branch | |
targetbranch | string | TargetBranch specifies the pullrequest target branch | |
title | string | Title defines the Bitbucket pullrequest title. | |
token | string | “token” specifies the credential used to authenticate with Bitbucket Cloud API The “token” is a repository or project access token with “pullrequest:write” scope. “token” and “password” are mutually exclusive remark: A token is a sensitive information, it’s recommended to not set this value directly in the configuration file but to use an environment variable or a SOPS file. The value can be set to
https://github.com/getsops/sops | |
username | string | “username” specifies the username used to authenticate with Bitbucket Cloud API |
Example
# updatecli.yaml
# updatecli diff --config updatecli.yaml
#
name: Show Bitbucket Cloud pipeline example
# Sources are responsible to fetch information from third location such as npm registry.
sources:
updatecli:
name: Get latest axios version
kind: npm
spec:
name: axios
# Targets are responsible to update targeted files such as a yaml file.
targets:
npm:
name: Update e2e test file
kind: yaml
sourceid: updatecli
scmid: bitbucket
spec:
file: e2e/updatecli.d/success.d/npm.yaml
key: conditions.axios.spec.version
###
# Actions such as gitlab/mergerequest is triggered if a target is updated.
actions:
default:
title: Bump axios version
kind: bitbucket/pullrequest
scmid: bitbucket
scms:
bitbucket:
kind: bitbucket
spec:
owner: "olblak"
repository: "updatecli"
branch: main
# {{ if (env "BITBUCKET_TOKEN") }}
token: '{{ env "BITBUCKET_TOKEN" }}'
# {{ else if (and (env "BITBUCKET_USER") (env "BITBUCKET_APP_PASSWORD")) }}
username: '{{ env "BITBUCKET_USER" }}'
password: '{{ env "BITBUCKET_APP_PASSWORD" }}'
# {{ end }}