ghsourcetest

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 11 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 ghsourcetest holds the GitHub plugin's synthetic rows: one per situation kind, viewer's or others' pull request, in or out of scope, muted or not, each derived by prrow's real deriver.

Index

Constants

View Source
const (
	Viewer   = "octocat"
	Other    = "alice"
	Reviewer = "bob"
	Team     = "acme/core"
)

Variables

View Source
var Now = time.Date(2026, 10, 22, 15, 0, 0, 0, time.UTC)

Now is the instant every row is derived at.

View Source
var ReviewWorkspace = dinv.Workspace{ID: "ws-r", DisplayName: "review", Status: "in-review", IsReview: true}

ReviewWorkspace is a review workspace of the loop.

Functions

func Derive

func Derive(s Situation) api.Row

Derive is s's row as prrow's deriver serves it at s.At (default Now) to Viewer.

func Event

func Event(n int, kind, actor string, at time.Time, data string) dinv.Event

Event is an event of pull request n.

func Open

func Open(n int, author string) dinv.PR

Open is an open, in-scope pull request n by author with green checks.

func Ref

func Ref(n int) pr.Ref

Ref is the case pull request n.

func Rows

func Rows() []api.Row

Rows is every case's row.

Types

type Case

type Case struct {
	Name string
	Row  api.Row
}

Case is one named row.

func Cases

func Cases() []Case

Cases is the differential table: every base situation by author, scope and mute.

type Situation

type Situation struct {
	PR       dinv.PR
	Events   []dinv.Event
	Override dinv.Override
	Turn     *prrow.TurnFact
	Pending  *round.Pending
	// At is when the row is derived; zero is Now.
	At time.Time
}

Situation is what one row derives from.

Jump to

Keyboard shortcuts

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