factsgithub

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: Apache-2.0 Imports: 32 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func LocalGit

func LocalGit(g gitx.Git) sweep.LocalGit

LocalGit reads the checkouts through git.

func SnapshotOf

func SnapshotOf(set *workspace.Set) sweep.Snapshot

SnapshotOf is the snapshot merged from every manager of set; nil when one keeps none.

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 New

func New(d Deps) *Provider

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

func (p *Provider) Carded(ctx context.Context) ([]unit.Unit, error)

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

func (p *Provider) Due() time.Time

Due is the earliest instant after now a decision of the last evaluation changes with no input changing.

func (*Provider) Facts

func (p *Provider) Facts(ctx context.Context, u unit.Unit) (workflow.Facts, error)

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

func (p *Provider) List(ctx context.Context, id unit.ProviderID) ([]unit.Unit, error)

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.

func (*Provider) Prefetch

func (p *Provider) Prefetch(ctx context.Context, units []unit.Unit) error

Prefetch reads the facts of units in one query, for the Author calls that follow on the same view.

func (*Provider) Revs added in v0.3.0

func (p *Provider) Revs(_ context.Context, units []unit.Unit) (map[unit.Unit]uint64, error)

Revs are the revs of units' pull requests, each grown by every inventory change noted of it since the provider was built; none without a change log.

type Store

type Store interface {
	Overrides(ctx context.Context) (map[pr.Ref]dinv.Override, error)
	EventsByPR(ctx context.Context, refs []pr.Ref) (map[pr.Ref][]dinv.Event, error)
}

Store is what the facts read of the inventory besides the planning inputs.

Jump to

Keyboard shortcuts

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