Github Pull Request

kind: github/pullrequest

Description

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

Parameters

Name Type Description Required
assignees array

Assignees contains the list of assignee to add to the pull request

default: empty

remark:

  • Please note that contrary to reviewers, assignees only accept GitHub usernames
automerge boolean

automerge allows to enable/disable the automerge feature on new pullrequest deprecated since the field “merge.strategy” should now be used to specify the merge strategy and enable automerge with “auto” value.

compatible:

  • action

default: false

deprecated: use merge.strategy: auto instead

description string

description allows to prepend information to the pullrequest description.

compatible:

  • action

default: empty

draft boolean

draft allows to set pull request in draft

compatible:

  • action

default: false

labels array

labels specifies repository labels used for the Pull Request.

compatible:

  • action

default: empty

remark: Labels must already exist on the repository

maintainercannotmodify boolean

maintainercannotmodify allows to specify if maintainer can modify pullRequest

compatible:

  • action

default: false

merge object

merge configures automatic merge behavior for the pull request.

compatible:

  • action

default: strategy: manual (no automatic merge)

example: merge: strategy: client # merge immediately via API (no server-side automerge needed) after: 24h # never merge before waiting 24h

    after string after specifies a minimum duration to wait before merging (e.g., “24h”, “30m”) The pull request will not be merged until it has been open for at least this duration.
    strategy string strategy specifies the merge strategy: “client”, “auto”, or “manual” (default) client: merge immediately via GitHub API (no server-side automerge needed) auto: enable server-side auto-merge (requires branch protection rules) manual: do not merge automatically (default)
mergemethod string

mergemethod allows to specifies what merge method is used to incorporate the pull request.

compatible:

  • action

default: ""

remark: Accept “merge”, “squash”, “rebase”, or ""

parent boolean

parent allows to specifies if a pull request should be sent to the parent of the current fork.

compatible:

  • action

default: false

reviewers array

Reviewers contains the list of assignee to add to the pull request compatible:

  • action

default: empty

remark:

  • if reviewer is a team, the format is “organization/team” and the token must have organization read permission.
title string

title allows to override the pull request title

compatible:

  • action

default: The default title is fetch from the first following location:

  1. The action title
  2. The target title if only one target
  3. The pipeline target
usetitleforautomerge boolean

usetitleforautomerge allows to specifies to use the Pull Request title as commit message when using auto merge,

compatible:

  • action

default: ""

remark: Only works for “squash” or “rebase”

Example

# updatecli.yaml
name: Update a file content and open a GitHub Pull Request

scms:
  website:
    kind: "github"
    spec:
      user: "user"
      email: "updatecli@example."
      owner: "updatecli"
      repository: "website"
      token: '{{ requiredEnv "GITHUB_TOKEN" }}'
      username: '{{ requiredEnv "GITHUB_AUTHOR" }}'
      branch: "main"

# Define action configurations if one needs to be created
actions:
  helm-charts:
    kind: "github/pullrequest"
    scmid: "website"
    spec:
      merge:
        strategy: auto
      description: "Prepend description"
      draft: false
      labels:
        - "dependencies"
        - "epinio"
      title: "Pull Request Title"

targets:
  default:
    scmid: website
    kind: file
    # spec:
    # ...
Top