Skip to content

Configuration reference

gh-maintainer’s agent reads one YAML file. This page lists every key, its type, its default and what it does, and shows how to deliver and override the file on Kubernetes.

The config lives in the ConfigMap gh-maintainer-config, key config.yaml. The CronJob mounts it at /config/config.yaml (the path comes from the GHM_CONFIG environment variable). Every job reads it at start, so a change takes effect on the next run without a restart.

The file is validated strictly:

  • An unknown key at any level is an error. Check the spelling.
  • A wrong type or an out-of-range value is an error.
  • A missing key takes its default. owner has no default: a missing or invalid owner is an error.

An invalid config makes the job exit with gh-maintainer: startup failed: <reason> and exit code 1.

Key Type Default Meaning
owner GitHub login none, required The GitHub user or organization whose repositories are maintained. Must be a valid GitHub login: 1 to 39 letters, digits or single hyphens, not starting or ending with a hyphen. The placeholder CHANGE_ME in the base fails this check on purpose.
dryRun boolean true When true, every write to GitHub is replaced by an action.would_* event. See Dry-run mode.

For a user, the agent lists the repositories that user owns, including private ones. For an organization, it lists all of the organization’s repositories. Archived repositories and forks are always skipped.

Key Type Default Meaning
repos.include list of strings [] When not empty, only these repositories are maintained.
repos.exclude list of strings [] These repositories are never maintained. Applied after include.

Use repository names (my-repo), not owner/name.

Key Type Default Meaning
dependabot.autoMergeTypes list of patch, minor [patch, minor] Bump types that are merged automatically when green. A bump type not in the list goes to the approval queue with reason major. Major bumps are never auto-merged. Below 1.0.0 a minor bump (0.1.0 to 0.2.0) and any 0.0.x change count as major, and so does a downgrade. Versions with identical build metadata on both sides (1.2.1+spec-1.1.0 to 1.2.3+spec-1.1.0) are classified without it; a change in build metadata counts as major.
dependabot.commitBumps list of dependency names [] Dependencies whose git-commit bumps (Bump kiosk-kit from `ef323d4` to `76052bf` ) are merged automatically when green, like a patch. The name must match exactly. Any other commit bump goes to the approval queue with reason major. A commit bump can contain anything, so list only dependencies you control.
dependabot.mergeMethod squash, merge or rebase squash How the agent merges green Dependabot PRs. The Approve button still always squash-merges.
dependabot.minReleaseAgeHours number, 0 or more 0 An update that would be auto-merged waits until its PR is at least this many hours old, counted from when Dependabot opened it. Until then it is pending with reason too-new (the widget shows “waiting for release age”). Updates that need approval are not delayed. 0 turns the wait off.
dependabot.overrides list of overrides [] Per-repository or per-dependency rules; see below.

To merge only patch bumps automatically, set autoMergeTypes: [patch]; minor bumps then go to the approval queue. With autoMergeTypes: [], every Dependabot bump needs your approval.

To auto-merge commit bumps of your own git dependency, set commitBumps: [kiosk-kit].

Each override has repo and/or dependency (at least one), and may set autoMergeTypes and minReleaseAgeHours. A pattern is an exact name, or a prefix when it ends in * (tauri*, @types/*); case is ignored. The dependency is read from the PR title (Bump <dependency> from …); grouped updates have none, so they match only overrides without dependency. Every override whose given fields all match applies: each setting comes from the first matching override that sets it, and settings no matching override sets use the global values. An override with autoMergeTypes: [] also sends allow-listed commit bumps to the approval queue.

dependabot:
minReleaseAgeHours: 72
overrides:
- dependency: "tauri*" # Tauri crates always need approval
autoMergeTypes: []
- dependency: "@tauri-apps/*" # and the Tauri npm packages
autoMergeTypes: []
- repo: "pikiosk-*" # wait a week in kiosk repos
minReleaseAgeHours: 168
Key Type Default Meaning
branches.staleDays positive integer 90 A branch without an open PR is deleted when its last commit is older than this many days.
branches.keep list of strings [main, master, develop, "release/*"] Branch names that are never deleted. A pattern that ends in * matches by prefix; anything else must match exactly.

main, master, develop and release/*, the default branch and protected branches are always kept, even if you replace branches.keep with another list. Branches whose PR was merged are deleted regardless of age. See Branches module.

Key Type Default Meaning
fixer.enabled boolean true When false, failing Dependabot PRs stay pr.pending with reason fixer disabled.
fixer.repos list of strings not set When set, the fixer runs only in these repositories. Others get pr.pending with reason fixer disabled.
fixer.timeoutMinutes positive integer 15 Timeout for one Claude Code run.
fixer.maxTurns positive integer 40 Passed to Claude Code as --max-turns.
fixer.cooldownHours positive number 24 Minimum time between two fix attempts on the same PR. Every attempt counts, including dry-run attempts and failures.
Key Type Default Meaning
security.localScanIntervalHours positive number 24 Minimum time between two local scans (trivy, gitleaks, osv-scanner) of the same repository. GitHub alerts, hygiene and the workflow audit run on every run.

These values are set in code and are not configurable:

Limit Value
Schedule 0 */2 * * * (in deploy/base/cronjob.yaml, patchable)
Maximum job duration 5,400 s (activeDeadlineSeconds, patchable)
No new fix after 45 minutes of run time
No new local scan after 60 minutes of run time
Minimum remaining REST quota before a repository 100 requests
CI log lines per failed job given to the fixer 300 (at most 60 KB in total)
Timeout per scanner 10 minutes
Event retention 30 days

The shipped default, with every key:

owner: acme
dryRun: true
repos:
include: []
exclude: []
dependabot:
autoMergeTypes: [patch, minor]
mergeMethod: squash
branches:
staleDays: 90
keep: [main, master, develop, "release/*"]
fixer:
enabled: true
# repos: [service-a, service-b] # optional allow-list
timeoutMinutes: 15
maxTurns: 40
cooldownHours: 24
security:
localScanIntervalHours: 24

A stricter live setup: only patch bumps merge on their own, the fixer works in two repositories, one large monorepo is excluded and long-lived support/* branches are kept:

owner: acme
dryRun: false
repos:
include: []
exclude: [giant-monorepo]
dependabot:
autoMergeTypes: [patch]
mergeMethod: squash
branches:
staleDays: 120
keep: [main, master, develop, "release/*", "support/*"]
fixer:
enabled: true
repos: [website, cli-tool]
timeoutMinutes: 15
maxTurns: 40
cooldownHours: 24
security:
localScanIntervalHours: 24

Don’t edit deploy/base/configmap.yaml for your installation: it holds only placeholders (owner: CHANGE_ME, dryRun: true), an update of the base resets it, and CI rejects install-specific values in the shared base. Instead, copy the template overlay deploy/overlays/example and set your values there:

Terminal window
cp -r deploy/overlays/example deploy/overlays/mine

deploy/overlays/mine/config.yaml replaces the base ConfigMap:

apiVersion: v1
kind: ConfigMap
metadata:
name: gh-maintainer-config
namespace: gh-maintainer
data:
config.yaml: |
owner: acme # your GitHub user or organization
dryRun: true
repos: { include: [], exclude: [] }
dependabot: { autoMergeTypes: [patch, minor] }
branches: { staleDays: 90, keep: [main, master, develop, "release/*"] }
fixer: { timeoutMinutes: 15, maxTurns: 40, cooldownHours: 24, enabled: true }
security: { localScanIntervalHours: 24 }

The patch replaces the whole config.yaml value, so include every setting you want to keep.

The status server has its own OWNER environment variable, which it uses to merge and comment on approvals. It must name the same account as owner. In deploy/overlays/mine/kustomization.yaml, the template patches it with a guarded JSON patch:

patches:
- path: config.yaml
- target: { group: apps, version: v1, kind: Deployment, name: status-server }
patch: |-
- op: test
path: /spec/template/spec/containers/0/env/1/name
value: OWNER
- op: replace
path: /spec/template/spec/containers/0/env/1/value
value: acme # same as owner in config.yaml

The test operation makes the render fail if the base ever moves OWNER away from the second environment variable. Render, check and apply:

Terminal window
kubectl kustomize deploy/overlays/mine | grep -E 'owner:|OWNER' -A1 # no CHANGE_ME left
kubectl apply -k deploy/overlays/mine
kubectl -n gh-maintainer get configmap gh-maintainer-config -o jsonpath='{.data.config\.yaml}'

The installation guide covers the other placeholders in the template (host, components, classes). For a real-world overlay, see deploy/overlays/pjo-vpn.

These are set by the manifests. Apart from OWNER, you normally don’t change them.

Agent (CronJob):

Variable Value in the manifests Meaning
STATUS_URL http://status-server:8080 Where events are posted. Required.
GHM_CONFIG /config/config.yaml Path of the config file
GHM_SECRETS_DIR /secrets Directory with the GITHUB_TOKEN, EVENT_TOKEN and CLAUDE_CODE_OAUTH_TOKEN files
GHM_WORK_DIR /work Writable work directory for clones and scans

Status server (Deployment):

Variable Value in the manifests Meaning
PORT 8080 Listen port
OWNER CHANGE_ME (placeholder) GitHub owner for approve and reject. Required: set it to your owner in your overlay, see Set the owner in both places. Without a valid GitHub login the server exits at start with status-server: OWNER must be your GitHub user or organization name (got "CHANGE_ME").
DB_PATH /data/state.db SQLite database path
STATIC_DIR /app/public Web widget files
EVENT_TOKEN, GITHUB_TOKEN from the Secret gh-maintainer Required at start