board

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 17 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 board is prs's view on gotermboard: every open pull request as a row, its description a key away, and a key per action.

Index

Constants

View Source
const View = "pull-requests"

View is the board's one tab, the name --view takes.

Variables

This section is empty.

Functions

func Refused

func Refused(window config.WindowAction) error

Refused says why a window action cannot have its key, and is nil where the key is free. A board's key sits ahead of the table's, so a window action on a bound key would take it. esc backs out of whatever is open, which no table action names.

Types

type Board

type Board struct {
	// contains filtered or unexported fields
}

Board is the open pull requests of the repos a registry names, read from each provider that hosts one.

func New

func New(registryPath string, repos []registry.Repo, windows []config.WindowAction) (*Board, error)

New is a board over the repos read from the registry at registryPath, with the window actions the config adds. It refuses a window action on a key the board already binds.

func (*Board) Actions

func (b *Board) Actions() []gotermboard.Action

Actions is gotermboard.Keyed's. The board's keys sit ahead of the table's, so the footer and the ? overlay list them first.

func (*Board) Faults

func (b *Board) Faults() []string

Faults names each provider whose newest read failed, with why.

func (*Board) Frame

func (b *Board) Frame(now time.Time, _ string) gotermboard.Frame

Frame is gotermboard.Board's: one group of every open pull request, oldest first.

func (*Board) Groupings

func (b *Board) Groupings() []string

Groupings is gotermboard.Board's. The board has one.

func (*Board) Receive added in v0.3.0

func (b *Board) Receive(m *gotermboard.Model, msg tea.Msg) tea.Cmd

Receive is gotermboard.ReceivingBoard's.

func (*Board) Snapshot

func (b *Board) Snapshot(now time.Time) Snapshot

Snapshot reads what the board holds now.

func (*Board) Sources

func (b *Board) Sources() []gotermboard.Refresher

Sources is gotermboard.Board's.

func (*Board) UnderWay added in v0.3.0

func (b *Board) UnderWay() string

UnderWay is gotermboard.BusyBoard's: every command a key started that has not ended.

type Snapshot

type Snapshot struct {
	View         string               `json:"view"`
	Registry     string               `json:"registry"`
	PullRequests []SnapshotRow        `json:"pull_requests"`
	Sources      []gotermboard.Status `json:"sources"`
}

Snapshot is what --json prints: the rows the board draws, and how each read stands.

type SnapshotRow

type SnapshotRow struct {
	pullrequests.PullRequest
	StackedOn *int `json:"stacked_on"`
}

SnapshotRow is one pull request, and the open one it is stacked on where there is one.

Jump to

Keyboard shortcuts

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