Gitea Pull Request

kind: gitea/pullrequest

Description

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

Parameters

NameTypeDescriptionRequired
assigneesarray

“assignees” defines a list of assignees for the pull request.

	default:
		No assignees are set on the pull request.

	remark:
		You can use this to assign specific users to review the pull request.
		Make sure the users you specify have access to the repository.
bodystring

“body” defines a custom body pullrequest.

	default:
		By default a pullrequest body is generated out of a pipeline execution.

	remark:
		Unless you know what you are doing, you shouldn't set this value and rely on the sane default.
		"body" is useful to provide additional information when reviewing pullrequest, such as changelog url.
ownerstring

“owner” defines the Gitea repository owner.

	remark:
		unless you know what you are doing, you shouldn't set this value and rely on the scmid to provide the sane default.
repositorystring

“repository” defines the Gitea repository for a specific owner

	remark:
		unless you know what you are doing, you shouldn't set this value and rely on the scmid to provide the sane default.
sourcebranchstring

“sourcebranch” defines the branch name used as a source to create the Gitea pullrequest.

	default:
		"sourcebranch" inherits the value from the scm branch if a scm of kind "gitea" is specified by the action.

	remark:
		unless you know what you are doing, you shouldn't set this value and rely on the scmid to provide the sane default.
targetbranchstring

“targetbranch” defines the branch name used as a target to create the Gitea pullrequest.

	default:
		"targetbranch" inherits the value from the scm working branch if a scm of kind "gitea" is specified by the action.

	remark:
		unless you know what you are doing, you shouldn't set this value and rely on the scmid to provide the sane default.
		the Gitea scm will create and use a working branch such as updatecli_xxxx
titlestring

“title” defines the Gitea pullrequest title

	default:
		A Gitea pullrequest title is defined by one of the following location (first match)
			1. title is defined by the spec such as:

				actions:
					default:
						kind: gitea/pullrequest
						scmid: default
						spec:
							title: This is my awesome title

			2. title is defined by the action such as:

				actions:
					default:
						kind: gitea/pullrequest
						scmid default
						title: This is my awesome title

			3. title is defined by the first associated target title

			4. title is defined by the pipeline title

	remark:
		usually we prefer to go with option 2
tokenstring

“token” specifies the credential used to authenticate with Gitea 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 {{ requiredEnv "GITEA_TOKEN"}} to retrieve the token from the environment variable GITHUB_TOKEN or {{ .gitea.token }} to retrieve the token from a SOPS file.

  For more information, about a SOPS file, please refer to the following documentation:

https://github.com/getsops/sops

urlstring“url” defines the Gitea url to interact with
usernamestring“username” defines the username used to authenticate with Gitea API

Example

# updatecli.yaml
# updatecli.yaml
# updatecli diff --config updatecli.yaml
#
name: Show Gitea pipeline example

scms:
  gitea:
    kind: gitea
    spec:
      url: "demo.gitea.com"
      owner: "olblak"
      repository: "updatecli-mirror"
      branch: main

# 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: gitea
    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:
    kind: gitea/pullrequest
    scmid: gitea
    title: Bump axios version
Top