Stash Pull Request
kind: stash/pullrequest
On this page
Description
The action
section describes the Stash 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 Server API, it must be combined with “username” 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 | |
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 Server API 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 | |
url | string | “url” specifies the default stash url in case of Bitbucket Server | |
username | string | “username” specifies the username used to authenticate with Bitbucket Server API |
Example
# updatecli.yaml
# updatecli diff --config updatecli.yaml
#
name: Show Stash 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: stash
spec:
file: e2e/updatecli.d/success.d/npm.yaml
key: conditions.axios.spec.version
###
# Actions such as stash/pullrequest is triggered if a target is updated.
actions:
default:
title: Bump axios version
kind: stash/pullrequest
scmid: stash
scms:
stash:
kind: stash
spec:
owner: "olblak"
repository: "updatecli"
branch: main
# For the change to be apply, we need to specify stash credentials
#username: stash_username
#token: stash_token