Skip to content

Templating

Users can customize the content of text, such as the body and title of a pull request or the name of a branch.

Templates use Go template notation.

Template variables

The following variables are available:

Description Usage Example value
Full name of the repository {{.Repository.FullName}} codeberg.org/saturn-sync/saturn
Host of the repository {{.Repository.Host}} codeberg.org
Name of the repository {{.Repository.Name}} saturn
Owner of the repository {{.Repository.Owner}} saturn-sync
HTTP URL of the repository {{.Repository.WebUrl}} https://codeberg.org/saturn-sync/saturn
Name of the task {{.TaskName}} template-example

Run data

Run data is dynamic data that is known only when the task is running. Inputs are available via run data.

Run data can be accessed in a template in two ways.

{{ .Run.key }}

or, if the key contains a -, via the built-in index function:

{{ index .Run "key-with-hyphen" }}