Documentation
¶
Overview ¶
Package forge fetches tracker claims (issues, PRs) from a forge via its CLI. Fetching is strictly read-only and strictly optional: when no forge is reachable the audit degrades to pure git inference.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct {
Repo string `json:"repo"`
Issues []Issue `json:"issues"`
PRs []PR `json:"prs"`
// Checks reports CI state ("success", "failure", "pending", "unknown")
// for a commit, or ok=false when the forge can't answer. Lazy per-SHA
// call — only consulted for landed specs. Nil when unavailable, and the
// audit must then say nothing about CI rather than guess.
Checks func(sha string) (string, bool) `json:"-"`
}
func Fetch ¶
Fetch tries each supported forge in turn: GitHub via gh, then GitLab via glab. Returns ok=false when no forge is reachable — the audit degrades to pure git inference.
func FetchGitHub ¶
FetchGitHub returns tracker data for the repository at path, or ok=false when gh is not installed, not authenticated, or the repo has no GitHub remote. Failures are silent by contract — the audit must keep working.
func FetchGitLab ¶
FetchGitLab returns tracker data for the repository at path via glab, or ok=false when glab is missing, unauthenticated, or the repo isn't on a GitLab instance. Failures are silent by contract.