pr

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdjustColumnWidths added in v0.0.20

func AdjustColumnWidths(cols []TableColumn, prs []PRInfo)

AdjustColumnWidths widens each column so every value fits without truncation.

func AuthorInfoFunc added in v0.0.9

func AuthorInfoFunc(p PRInfo) string

func ColorizeStatus added in v0.0.11

func ColorizeStatus(state StatusState, detail string) string

func DependencyInfoFunc added in v0.0.6

func DependencyInfoFunc(p PRInfo) string

func ExtractDependencyName

func ExtractDependencyName(title string) string

func ExtractOwnerRepo added in v0.0.11

func ExtractOwnerRepo(htmlURL string) (string, string, error)

ExtractOwnerRepo parses owner and repo from a GitHub HTML URL (e.g. "https://github.com/OWNER/REPO/pull/123").

func ExtractVersion added in v0.0.9

func ExtractVersion(title string) string

func IsDependencyUpdateTitle added in v0.0.5

func IsDependencyUpdateTitle(title string) bool

IsDependencyUpdateTitle returns true if the PR title looks like an automated dependency update (Renovate or Dependabot), regardless of who authored it.

func MakeHyperlink(text, url string) string

func PrintPlainResults added in v0.0.7

func PrintPlainResults(w *os.File, status *PRStatus)

func PrintRow added in v0.0.6

func PrintRow(w *os.File, e StatusEntry, cols []TableColumn)

func PrintTableHeader

func PrintTableHeader(w *os.File, cols []TableColumn)

func RepoInfoFunc added in v0.0.6

func RepoInfoFunc(p PRInfo) string

func UpdateTable

func UpdateTable(w *os.File, entries []StatusEntry, cols []TableColumn)

func VersionInfoFunc added in v0.0.9

func VersionInfoFunc(p PRInfo) string

Types

type PRGroup

type PRGroup struct {
	Key   string
	PRs   []PRInfo
	Count int
}

func GroupByDependency

func GroupByDependency(prs []PRInfo) []PRGroup

func GroupByRepo

func GroupByRepo(prs []PRInfo) []PRGroup

type PRInfo

type PRInfo struct {
	Owner  string
	Repo   string
	Number int
	Title  string
	URL    string
	Author string
}

type PRStatus

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

func NewPRStatus

func NewPRStatus() *PRStatus

func (*PRStatus) ActionRequired added in v0.0.7

func (s *PRStatus) ActionRequired() []StatusEntry

func (*PRStatus) Add

func (s *PRStatus) Add(pr PRInfo) int

func (*PRStatus) FormatSummary

func (s *PRStatus) FormatSummary() string

func (*PRStatus) Len

func (s *PRStatus) Len() int

func (*PRStatus) MergedEntries added in v0.0.7

func (s *PRStatus) MergedEntries() []StatusEntry

func (*PRStatus) SkippedEntries added in v0.0.7

func (s *PRStatus) SkippedEntries() []StatusEntry

func (*PRStatus) Snapshot

func (s *PRStatus) Snapshot() []StatusEntry

func (*PRStatus) Summary

func (s *PRStatus) Summary() (merged, failed, skipped int)

func (*PRStatus) Update

func (s *PRStatus) Update(idx int, state StatusState, detail string)

type StatusEntry

type StatusEntry struct {
	PR     PRInfo
	State  StatusState
	Detail string
}

type StatusState

type StatusState int
const (
	StatusPending StatusState = iota
	StatusChecking
	StatusApproving
	StatusMerging
	StatusRetrying
	StatusMerged
	StatusAlreadyMerged
	StatusAutoMerge
	StatusFailed
	StatusSkipped
	StatusConflict
	StatusUntrustedAuthor
)

func (StatusState) String

func (s StatusState) String() string

type TableColumn added in v0.0.9

type TableColumn struct {
	Label string
	Width int
	Fn    func(PRInfo) string
}

func DependencySelectedColumns added in v0.0.9

func DependencySelectedColumns() []TableColumn

func FullColumns added in v0.0.9

func FullColumns() []TableColumn

func RepoSelectedColumns added in v0.0.9

func RepoSelectedColumns() []TableColumn

Jump to

Keyboard shortcuts

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