Stash Pull Request

kind: stash/pullrequest

Description

The action section describes the Stash Pull Request that updatecli is expected to open (or update) when a target is modified.

Parameters

NameTypeDescriptionRequired
bodystringBody defines the Bitbucket pullrequest body
ownerstringOwner specifies repository owner
passwordstring[S][C][T] Token specifies the credential used to authenticate with
repositorystringRepository specifies the name of a repository for a specific owner
sourcebranchstringSourceBranch specifies the pullrequest source branch
targetbranchstringTargetBranch specifies the pullrequest target branch
titlestringTitle defines the Bitbucket pullrequest title.
tokenstring[S][C][T] Token specifies the credential used to authenticate with
urlstring[S][C][T] URL specifies the default github url in case of Bitbucket enterprise
usernamestring[S][C][T] Username specifies the username used to authenticate with Bitbucket 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

Top