lib

package module
v0.48.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2026 License: BSD-2-Clause Imports: 1 Imported by: 0

README

Maintainer

CI Ask DeepWiki

Shared Go library + Helm chart for the bborbe autonomous repo-maintenance fleet: watchers detect GitHub signals (open PRs, failed CI, release-ready CHANGELOGs) and emit tasks; Pattern B Job agents act on them (review PRs, cut releases). It runs on top of the bborbe/agent task/agent system.

Layout note (2026-07): the five services were split out of this monorepo into their own publish-only repos (below), and the shared library was flattened to this repo's root — module github.com/bborbe/maintainer (matching the bborbe/agent layout). This repo now ships only the library + the chart; it builds no image.

The fleet

Repo Role Image
github-pr-watcher Producer — polls open PRs, emits review tasks docker.io/bborbe/github-pr-watcher
github-build-watcher Producer — polls CI, emits build-fix tasks on green→red docker.io/bborbe/github-build-watcher
github-release-watcher Producer — polls master for ## Unreleased, emits release tasks docker.io/bborbe/github-release-watcher
github-pr-review-agent Agent — reviews a PR, posts a verdict docker.io/bborbe/github-pr-review-agent
github-releaser-agent Agent — classifies the semver bump, rewrites CHANGELOG, tags + pushes docker.io/bborbe/github-releaser-agent

Flow: a watcher polls a GitHub signal and publishes a task.CreateCommand to Kafka → the agent task controller materialises a vault task → the agent-task-executor spawns one Kubernetes Job per task/phase → the agent (pr-review / releaser) does the work. Operator surface: vault-cli and task-orchestrator.

This repo

1. Shared library — github.com/bborbe/maintainer

Imported by all five services. Packages:

Package Purpose
githubapp GitHub App auth (installation tokens from an App ID + PEM)
repoallowlist REPO_ALLOWLIST parsing + host-qualified include/exclude matching
prurl Platform-agnostic PR URL parser (GitHub / Bitbucket)
maintainerconfig .maintainer.yaml parsing (prReviewer.autoApprove, release.autoRelease, release.allowMajorBump)
(root) shared CQRS/CDB task schema helpers
go get github.com/bborbe/maintainer@latest
2. Helm chart — helm/

Deploys the fleet onto Kubernetes: the 3 watcher StatefulSets + the 2 agent Config CRs (of agent.benjamin-borbe.de/v1, consumed by the core agent chart's executor). Generic/values-driven — image names, allowlists, App IDs, topic prefixes and secrets are all supplied per-stage by the consuming values. Published to OCI as oci://registry-1.docker.io/bborbe/maintainer.

The quant deployment (dev + prod values + keel-pattern Makefile) lives in the private bborbe/quant config repo under maintainer/.

Per-repo bot config — .maintainer.yaml

Each target repo opts into the fleet via a root .maintainer.yaml (read from the PR head / master):

release:
  autoRelease: true      # github-release-watcher may emit a release task
  allowMajorBump: false  # github-releaser-agent needs explicit opt-in for major bumps
prReviewer:
  autoApprove: true      # github-pr-review-agent's APPROVE counts toward the merge gate

Build

make precommit   # fmt, generate, test, lint, vet, vuln, license (single root module)

License

BSD 2-Clause License. See LICENSE.

Documentation

Index

Constants

This section is empty.

Variables

CDBSchemaIDs lists every CQRS schema published by the maintainer pipeline. trading/strimzi/topic-controller imports this slice and provisions the matching Kafka topics (one trio of request/event/result topics per ID).

View Source
var GithubBuildV1SchemaID = cdb.SchemaID{
	Group:   "maintainer",
	Kind:    "githubbuild",
	Version: "v1",
}

GithubBuildV1SchemaID is the schema for the github-build watcher's command topic. Carries Trigger-style commands consumed by the watcher pod to drive the build-fixer pipeline.

View Source
var GithubDarkFactoryV1SchemaID = cdb.SchemaID{
	Group:   "maintainer",
	Kind:    "githubdarkfactory",
	Version: "v1",
}

GithubDarkFactoryV1SchemaID is the schema for the github-dark-factory watcher's command topic. Carries Trigger-style commands consumed by the watcher pod to force a draft PR (with an approved spec) into the dark-factory-implement pipeline immediately, bypassing the poll interval.

View Source
var GithubPRReviewV1SchemaID = cdb.SchemaID{
	Group:   "maintainer",
	Kind:    "githubprreview",
	Version: "v1",
}

GithubPRReviewV1SchemaID is the schema for the github-pr watcher's command topic. Carries Trigger-style commands consumed by the watcher pod to drive the pr-reviewer pipeline.

View Source
var GithubReleaserV1SchemaID = cdb.SchemaID{
	Group:   "maintainer",
	Kind:    "githubreleaser",
	Version: "v1",
}

GithubReleaserV1SchemaID is the schema for the github-release watcher's command topic. Carries Trigger-style commands consumed by the watcher pod to drive the github-releaser pipeline.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
lib module
Package maintainerconfig defines the single schema of the per-repo `.maintainer.yaml` trust file shared by all maintainer bots, plus a pure parser.
Package maintainerconfig defines the single schema of the per-repo `.maintainer.yaml` trust file shared by all maintainer bots, plus a pure parser.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL