Skip to content

Saturn Documentation

Create, modify or delete files in many repositories in parallel.

Use cases

  • Onboard repositories to CI workflows and keep those files in sync.
  • Perform automatic rewrite of code scattered in many repositories and create pull requests.

Features

  • Create or delete files.
  • Insert, replace or delete lines in files.
  • Filter which repositories to modify.
  • Support for GitHub, GitLab and Forgejo.
  • Write plugins in Go or Python to implement custom logic and complex changes.
  • Automatically merge pull requests if all checks have passed and all approvals have been given.

Quickstart

Requirements:

Create the file hello-world.yaml:

hello-world.yaml
# yaml-language-server: $schema=https://saturn-bot.readthedocs.io/en/latest/schemas/task.schema.json
name: "Saturn Hello World"
prTitle: "Saturn Hello World"
prBody: |
  Saturn Quickstart.

  This pull request creates the file `hello-world.txt`.

# Filters tell Saturn which repositories to modify.
filters:
  - filter: repository
    params:
      host: github.com
      owner: wndhydrnt # Replace with your owner
      name: saturn-example # Replace with your repository

# Actions tell Saturn how to modify each repository.
actions:
  - action: fileCreate
    params:
      content: "Hello World"
      path: "hello-world.txt"

Run Saturn:

GitHub

SATURN_GITHUBTOKEN=<token> saturn run hello-world.yaml

GitLab

SATURN_GITLABTOKEN=<token> saturn run hello-world.yaml

Forgejo

SATURN_FORGEJOADDRESS=https://<forgejo>/api/v1 SATURN_FORGEJOTOKEN=<token> saturn run hello-world.yaml