Repository storage is opt-in and coexists with built-in storage. Existing taps stay where
they are until you move them; you can run a mix of both indefinitely, and move any tap back to
built-in storage at any time.
What you get
- A commit per save — from the tap wizard, the Assistant, or the API. Commit messages are
templated (e.g.
tap(weather-forecast): update via Datris). - Runs pinned to a commit — a scheduled run executes exactly the version that was saved, served from a local cache, so cron runs make no GitHub API calls and keep working if GitHub is unreachable.
- External editing — commit changes from your IDE; Datris detects the drift when the tap is opened and offers to load the latest version.
- Conflict protection — if the script changed in the repository after you opened it, saving is rejected with a clear message instead of silently overwriting.
Setup
1. Create (or pick) a repository
Any repository works — private is typical. Scripts are written to<path prefix><tap-name>.py (default taps/<tap-name>.py) on the branch you configure.
2. Create a fine-grained personal access token
A PAT is created under a GitHub user account and scoped to repositories — you don’t add it to the repository itself. Datris needs Contents: Read and write on just the one repo:- On GitHub, click your avatar → Settings → Developer settings (bottom of the left sidebar) → Personal access tokens → Fine-grained tokens → Generate new token.
- Set a name and an expiration.
- Resource owner: pick the user or organization that owns the target repository.
- Repository access: choose Only select repositories and pick the repo.
- Under Permissions → Repository permissions, set Contents: Read and write (Metadata: Read is added automatically as a mandatory permission).
- Generate the token and copy it immediately — GitHub shows it only once.
Fine-grained PATs always expire. When the token lapses, saves and non-cached reads for
repository-backed taps fail until you update the secret with a fresh token. Put the expiry
date somewhere you’ll see it.
3. Connect it in Datris
In Configuration → Code Repository:- Enter the repository (
owner/repo), branch, and path prefix. - Under Token secret, click Create one, name it (e.g.
github), and paste the token. This stores it in the secrets store with the shape Datris expects — atokenfield, tagged_type=repo_token. - Click Test connection — it verifies the token can reach the repository, has push access, and that the branch exists.
- Check Enable repository storage and Save. Saving re-validates the connection.
GitHub Enterprise Server
Set API base URL to your instance’s API endpoint (e.g.https://ghes.example.com/api/v3).
Leave it at https://api.github.com for github.com.
Day-to-day behavior
Run history records the commit SHA each run executed, so any run can be traced to the exact
script version in your repository.
Moving taps between backends
In the Taps list, each row shows a GitHub badge when its script is repository-backed. The cloud action on the row moves a tap’s script in either direction:- Move to GitHub — commits the current script to the repository and re-points the tap.
- Move to built-in storage — copies the script back to object storage. The repository file is left in place (remove it manually if you want it gone).
