Documentation
¶
Overview ¶
Package maintenance loads per-repo config from .maintenance.yaml on GitHub.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileContentFetcher ¶
type FileContentFetcher interface {
GetFileContent(ctx context.Context, owner, repo, path, ref string) ([]byte, error)
}
FileContentFetcher fetches raw file bytes from a GitHub repository. Matches the GetFileContent method signature on pkg.GitHubClient.
type GithubBuildConfig ¶
type GithubBuildConfig struct {
Assignee string
Status string
Phase string
IncludeLogs bool // include_logs: true enables the ## Error log snippet opt-in
}
GithubBuildConfig holds the watcher.github-build subtree of .maintenance.yaml. All fields are optional; empty string means "no override — use watcher default".
type Loader ¶
type Loader interface {
// LoadOverrides fetches .maintenance.yaml from the repo's default branch and
// returns the watcher.github-build subtree. Never returns an error — all
// failures are logged and result in an empty GithubBuildConfig (fall through
// to watcher defaults). Empty string fields mean "no override".
LoadOverrides(ctx context.Context, owner, repo, defaultBranch string) GithubBuildConfig
}
Loader fetches per-repo override config for the build watcher.
func NewLoader ¶
func NewLoader(fetcher FileContentFetcher) Loader
NewLoader returns a Loader backed by the given FileContentFetcher.