Documentation
¶
Overview ¶
Package factsgithub is the github source's workflow facts: the pull requests a sweep plans over, as automation.Units, and their author facts, as views.Facts. It lays the host's own state over what the GitHub plugin reports, its planner's facts among it, and never asks GitHub.
Index ¶
- func LocalGit(g gitx.Git) sweep.LocalGit
- func SnapshotOf(set *workspace.Set) sweep.Snapshot
- type Deps
- type Provider
- func (p *Provider) Author(ctx context.Context, u unit.Unit, needLocal bool) (*dview.AuthorFacts, error)
- func (p *Provider) Carded(ctx context.Context) ([]unit.Unit, error)
- func (p *Provider) Due() time.Time
- func (p *Provider) Facts(ctx context.Context, u unit.Unit) (workflow.Facts, error)
- func (p *Provider) List(ctx context.Context, id unit.ProviderID) ([]unit.Unit, error)
- func (p *Provider) Prefetch(ctx context.Context, units []unit.Unit) error
- func (p *Provider) Revs(_ context.Context, units []unit.Unit) (map[unit.Unit]uint64, error)
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Deps ¶
type Deps struct {
Inputs dinv.PlanInputs
Store Store
Snapshot sweep.Snapshot
Books sweep.Books
Rounds sweep.Rounds
Git sweep.LocalGit
Cfg func() config.Config
Clock port.Clock
Changes port.Changes
Intents func() *dintent.Registry
// Reports are what the GitHub plugin last reported of its pull
// requests: their situations, the facts that read them alone and its
// planner's; nil reports none.
Reports readmodel.Reports
// Mutes are the user's mutes of pull requests, their tasks' wakes; nil
// mutes none.
Mutes readmodel.Mutes
}
Deps are what the provider reads. Changes and Intents may be nil: without Changes every call reads the store again.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider is the github source's facts.
func (*Provider) Author ¶
func (p *Provider) Author(ctx context.Context, u unit.Unit, needLocal bool) (*dview.AuthorFacts, error)
Author is what the views read of u's pull request to project its author card; with needLocal, also its author workspace's checkout, as far as dview.AuthorColumn may need it. Nil when the store holds no such pull request.
func (*Provider) Carded ¶
Carded lists, in order, the pull requests a workspace on the user's board targets: those whose cards the facts move without a turn.
func (*Provider) Due ¶
Due is the earliest instant after now a decision of the last evaluation changes with no input changing.
func (*Provider) Facts ¶
Facts are the pr facts of u; a pull request the store does not hold yet has those that need no row.
func (*Provider) List ¶
List is every unit a workflow over pull requests may act on: those a sweep plans over, the open ones nothing lapsed, the ones with an open turn and the ones with an answer waiting.