Configuration¶
Configuration is stored in the YAML format.
# yaml-language-server: $schema=https://saturn-bot.readthedocs.io/en/latest/schemas/config.schema.json
dataDir: /tmp/saturn
logFormat: console
githubToken: xxxxx
bitbucketToken¶
An API token to authenticate at the Bitbucket API. See https://developer.atlassian.com/cloud/bitbucket/rest/intro/#authentication.
Generate an access token for Bitbucket describes how to create the token.
Experimental
Support of Bitbucket is currently experimental. Some features might not work as expected.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_BITBUCKETTOKEN |
| Type | string |
bitbucketUsername¶
The username associated with a Bitbucket API token. This is the e-mail address of the Atlassian account that owns the API token. See https://support.atlassian.com/bitbucket-cloud/docs/using-api-tokens/.
Experimental
Support of Bitbucket is currently experimental. Some features might not work as expected.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_BITBUCKETUSERNAME |
| Type | string |
bitbucketWorkspace¶
The workspace to query in Bitbucket.
Required if bitbucketToken is set.
Experimental
Support of Bitbucket is currently experimental. Some features might not work as expected.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_BITBUCKETWORKSPACE |
| Type | string |
dataDir¶
Path to directory to store files and repository clones.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_DATADIR |
| Type | string |
dryRun¶
Toggle dry-run mode. No pull requests will be created or merged when enabled.
| Name | Value |
|---|---|
| Default | false |
| Env Var | SATURN_DRYRUN |
| Type | bool |
logFormat¶
Format of log messages.
| Name | Value |
|---|---|
| Default | auto |
| Env Var | SATURN_LOGFORMAT |
| Type | string |
| Values | auto, console, json |
logLevel¶
Log level of the application.
| Name | Value |
|---|---|
| Default | info |
| Env Var | SATURN_LOGLEVEL |
| Type | string |
| Values | debug, error, info, warn |
forgejoAddress¶
Address of the Forgejo instance. For example, http://forgejo.local/api/v1.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_FORGEJOADDRESS |
| Type | string |
forgejoToken¶
Token to authenticate at the the Forgejo instance.
Generate an access token for Forgejo describes how to generate a token.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_FORGEJOTOKEN |
| Type | string |
gitAuthor¶
Author to use for git commits. Global git configuration applies if not set. Must conform to RFC5322: User Name <user@name.local>.
If not set, Saturn tries to discover the author via the host of the repository.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_GITAUTHOR |
| Type | string |
gitCloneOptions¶
Command-line options to pass to git clone.
| Name | Value |
|---|---|
| Default | ["--filter", "blob:none"] |
| Env Var | SATURN_GITCLONEOPTIONS |
| Type | [string] |
gitLogLevel¶
Level for logs sent by the git sub-system. These logs can be very verbose and can make it tricky to find logs of other sub-systems.
| Name | Value |
|---|---|
| Default | changes by Saturn |
| Env Var | SATURN_GITCOMMITMESSAGE |
| Type | string |
| Values | debug, error, info, warn |
gitPath¶
Path to git executable. PATH will be searched if not set.
| Name | Value |
|---|---|
| Default | git |
| Env Var | SATURN_GITPATH |
| Type | string |
gitPrivateKey¶
PGP key to sign Git commits.
Saturn supports GPG keys only.
Visit one of the following documentation pages to learn how to generate the private key:
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_GITPRIVATEKEY |
| Type | string |
Note
Saturn does not sign commits of existing pull requests unless it detects new changes. It then signs the new commit to update a pull request.
Example
gitUrl¶
Configure how to clone git repositories.
Set to ssh to clone repositories via SSH.
| Name | Value |
|---|---|
| Default | https |
| Env Var | SATURN_GITURL |
| Type | string |
| Values | https, ssh |
Warning
If set to ssh, git and ssh need to be configured.
Follow instructions for your platform:
githubAddress¶
Address of GitHub server to use.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_GITHUBADDRESS |
| Type | string |
githubCacheDisabled¶
If true, disables caching of HTTP responses received from the GitHub API.
| Name | Value |
|---|---|
| Default | false |
| Env Var | SATURN_GITHUBCACHEDISABLED |
| Type | bool |
githubToken¶
Token to use for authentication at the GitHub API.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_GITHUBTOKEN |
| Type | string |
gitlabAddress¶
Address of GitLab server to use.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_GITLABADDRESS |
| Type | string |
gitlabToken¶
Token to use for authentication at the GitLab API.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_GITLABTOKEN |
| Type | string |
goProfiling¶
Activate Go profiling endpoints for server or worker. The endpoints are available at /debug/pprof/. See https://go.dev/blog/pprof.
| Name | Value |
|---|---|
| Default | false |
| Env Var | SATURN_GOPROFILING |
| Type | bool |
labels¶
List of labels to add to each pull request created by Saturn. Allows an operator of Saturn to ensure that specific labels are always added without relying on the authors of tasks to set them.
Labels specified here are merged with the labels of a task.
| Name | Value |
|---|---|
| Default | [] |
| Env Var | SATURN_LABELS |
| Type | [string] |
prometheusPushgatewayUrl¶
Address of a Prometheus Pushgateway to send metrics to.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_PROMETHEUSPUSHGATEWAYURL |
| Type | string |
repositoryCacheTtl¶
Time-to-live of all items in the repository file cache. Saturn performs a full update of the cache once the TTL has expired. The format is a Go duration, like 30m or 12h.
| Name | Value |
|---|---|
| Default | 6h |
| Env Var | SATURN_REPOSITORYCACHETTL |
| Type | string |
serverAccessLog¶
Turn HTTP access log of server on or off.
| Name | Value |
|---|---|
| Default | false |
| Env Var | SATURN_SERVERACCESSLOGS |
| Type | bool |
serverAddr¶
Address of the server in the format <host>:<port>.
| Name | Value |
|---|---|
| Default | :3035 |
| Env Var | SATURN_SERVERADDR |
| Type | string |
serverApiKey¶
Secret required to authenticate at the API. Clients set the key as the value of the HTTP header X-API-KEY. Required if Saturn runs in server mode.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_SERVERAPIKEY |
| Type | string |
serverBaseUrl¶
URL of the API server. The value is used to populate the servers array in the OpenAPI definition.
| Name | Value |
|---|---|
| Default | http://localhost:3035 |
| Env Var | SATURN_SERVERBASEURL |
| Type | string |
serverCompress¶
Turn compression of responses on or off.
| Name | Value |
|---|---|
| Default | true |
| Env Var | SATURN_SERVERCOMPRESS |
| Type | bool |
serverDatabaseLog¶
If true, display executed SQL queries and errors of the database. Useful for debugging.
| Name | Value |
|---|---|
| Default | false |
| Env Var | SATURN_SERVERDATABASEPATH |
| Type | bool |
serverDatabasePath¶
Path to the sqlite database of the server. If unset, defaults to <dataDir>/db/Saturn.db.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_SERVERDATABASEPATH |
| Type | string |
serverRunTimeout¶
Time out a run if a worker takes longer than the given duration to report it.
| Name | Value |
|---|---|
| Default | 1h |
| Env Var | SATURN_SERVERRUNTIMEOUT |
| Type | string |
serverRunTimeoutCheckInterval¶
Interval at which the server checks if it needs to time out runs.
| Name | Value |
|---|---|
| Default | 1m |
| Env Var | SATURN_SERVERRUNTIMEOUTCHECKINTERVAL |
| Type | string |
serverWebhookSecretGithub¶
Secret to authenticate webhook requests sent by GitHub.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_SERVERWEBHOOKSECRETGITHUB |
| Type | string |
serverWebhookSecretGitlab¶
Secret to authenticate webhook requests sent by GitLab. See https://docs.gitlab.com/ee/user/project/integrations/webhooks.html#create-a-webhook for how to set up the token.
| Name | Value |
|---|---|
| Default | - |
| Env Var | SATURN_SERVERWEBHOOKSECRETGITLAB |
| Type | string |
serverServeUi¶
If true, serves the user interface.
| Name | Value |
|---|---|
| Default | true |
| Env Var | SATURN_SERVERSERVEUI |
| Type | bool |
workerLoopInterval¶
Interval at which a worker queries the server to receive new tasks to execute.
| Name | Value |
|---|---|
| Default | 10s |
| Env Var | SATURN_WORKERLOOPINTERVAL |
| Type | string |
workerParallelExecutions¶
Number of parallel executions of tasks per worker.
| Name | Value |
|---|---|
| Default | 1 |
| Env Var | SATURN_WORKERPARALLELEXECUTIONS |
| Type | integer |
workerServerAPIBaseURL¶
Base URL of the server API to query for new tasks to execute.
| Name | Value |
|---|---|
| Default | http://localhost:3035 |
| Env Var | SATURN_WORKERSERVERAPIBASEURL |
| Type | string |