ui

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBackgroundColor      = "#282828"
	RepoListColor               = "#b8bb26"
	PRListColor                 = "#fe8019"
	PRTLListColor               = "#d3869b"
	RevCmtListColor             = "#8ec07c"
	PrOpenColor                 = "#fabd2f"
	PrMergedColor               = "#b8bb26"
	PrClosedColor               = "#928374"
	AdditionsColor              = "#8ec07c"
	DeletionsColor              = "#fb4934"
	ReviewCommentedColor        = "#83a598"
	ReviewApprovedColor         = "#b8bb26"
	ReviewChangesRequestedColor = "#fabd2f"
	ReviewDismissedColor        = "#928374"
	DateColor                   = "#928374"
	FilePathColor               = "#d3869b"
	OutdatedColor               = "#fabd2f"
	NumReviewsColor             = "#665c54"
	NumCommentsColor            = "#83a598"
	DiffColor                   = "#83a598"
	RevCmtColor                 = "#d3869b"
	RevCmtDividerColor          = "#928374"
)
View Source
const (
	PRStateOpen            = "OPEN"
	PRStateMerged          = "MERGED"
	PRStateClosed          = "CLOSED"
	TLItemPRCommit         = "PullRequestCommit"
	TLItemPRReview         = "PullRequestReview"
	TLItemMergedEvent      = "MergedEvent"
	ReviewPending          = "PENDING"
	ReviewCommented        = "COMMENTED"
	ReviewApproved         = "APPROVED"
	ReviewChangesRequested = "CHANGES_REQUESTED"
	ReviewDismissed        = "DISMISSED"
)

Variables

View Source
var (
	HelpText = `` /* 999-byte string literal not displayed */

)

Functions

func GetPRTL

func GetPRTL(ghClient *ghapi.GraphQLClient, repoOwner string, repoName string, prNumber int, tlItemsCount int, commentsCount int) ([]prTLItem, error)

func GetPRs

func GetPRs(ghClient *ghapi.GraphQLClient, repoOwner string, repoName string, prCount int) ([]pr, error)

func InitialModel

func InitialModel(config Config) model

func RenderUI

func RenderUI(config Config)

func RightPadTrim

func RightPadTrim(s string, length int) string

func Trim

func Trim(s string, length int) string

Types

type Config

type Config struct {
	DiffPager *string
	PRCount   int
	Repos     []Repo
}

type HideHelpMsg

type HideHelpMsg struct{}

type PRChosenMsg

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

type PRDiffDoneMsg

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

type PRTLFetchedMsg

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

type PRViewDoneMsg

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

type PRsFetchedMsg

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

type Pane

type Pane uint

type Repo

type Repo struct {
	Owner string
	Name  string
}

func (Repo) Description

func (repo Repo) Description() string

func (Repo) FilterValue

func (repo Repo) FilterValue() string

func (Repo) Title

func (repo Repo) Title() string

type RepoChosenMsg

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

type SourceConfig

type SourceConfig struct {
	DiffPager *string `yaml:"diff-pager"`
	PRCount   int     `yaml:"pr-count"`
	Sources   []struct {
		Owner string `yaml:"owner"`
		Repos []struct {
			Name string `yaml:"name"`
		} `yaml:"repos"`
	} `yaml:"sources"`
}

type URLOpenedinBrowserMsg

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

Jump to

Keyboard shortcuts

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