Documentation
¶
Overview ¶
Package prinventory owns the remote pull-request inventory. It is separate from worktree discovery: the latter describes local WB-managed checkouts, while this package describes every open PR visible to GitHub for an owner.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderMarkdown ¶
RenderMarkdown renders a stable, reviewable snapshot. Rows are already sorted by Inventory; sorting again makes hand-built reports deterministic.
Types ¶
type Diagnostic ¶
type Filters ¶
type Filters struct {
State string `json:"state"`
IncludeArchived bool `json:"include_archived"`
CreatedBefore string `json:"created_before,omitempty"`
}
Filters is recorded in every report so an operator can see the scope that was actually queried, rather than inferring it from the rows returned.
type Options ¶
type Options struct {
Owners []Owner
ExcludeArchived bool
CreatedBefore string
Runner Runner
Now func() time.Time
Parallel int
}
Options controls one immutable snapshot.
type Owner ¶
type Owner struct {
Login string `json:"login"`
Qualifier string `json:"qualifier"` // org or user
}
Owner identifies one GitHub search qualifier.
type OwnerResult ¶
type PullRequest ¶
type PullRequest struct {
ID string `json:"id,omitempty"`
Repository string `json:"repository"`
Number int `json:"number"`
Title string `json:"title"`
URL string `json:"url"`
Author string `json:"author,omitempty"`
Draft bool `json:"draft"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Mergeable string `json:"mergeable,omitempty"`
MergeStateStatus string `json:"merge_state_status,omitempty"`
Conflict bool `json:"conflict"`
Checks []Check `json:"checks,omitempty"`
}
type Report ¶
type Report struct {
SchemaVersion int `json:"schema_version"`
SnapshotAt time.Time `json:"snapshot_at"`
Complete bool `json:"complete"`
Owners []Owner `json:"owners"`
EffectiveFilters Filters `json:"effective_filters"`
Counts Counts `json:"counts"`
PullRequests []PullRequest `json:"pull_requests"`
OwnerResults []OwnerResult `json:"owner_results"`
Diagnostics []Diagnostic `json:"diagnostics,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.