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
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
name: Test Gitea scm

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

sources:
  license:
    name: Retrieve license file content
    kind: file
    scmid: gitea
    spec:
      file: LICENSE

targets:
  license:
    name: Retrieve license file content
    kind: file
    scmid: gitea
    sourceid: license
    spec:
      file: LICENSE

actions:
  gitea:
    kind: gitea
Top