Documentation ¶
Overview ¶
Package triage provides an interactive command-line GitHub issue & notification triaging tool.
Index ¶
- func AddComment(n *github.Notification, issue *github.Issue, comment string) tea.Cmd
- func ClientFromContext(ctx context.Context) (*github.Client, bool)
- func GetDimensions(ctx context.Context) tea.Msg
- func Init(ctx context.Context) (tea.Model, tea.Cmd)
- func LoadNotification(n *github.Notification) tea.Cmd
- func LoadNotificationComments(issue *github.Issue) tea.Cmd
- func LoadNotificationIssue(n *github.Notification) tea.Cmd
- func LoadNotificationLabels(n *github.Notification, issue *github.Issue) tea.Cmd
- func LoadNotifications(ctx context.Context) tea.Msg
- func LoadRepoLabels(n *github.Notification) tea.Cmd
- func MarkAsRead(n *github.Notification) tea.Cmd
- func MustClientFromContext(ctx context.Context) *github.Client
- func NewClientContext(ctx context.Context, v *github.Client) context.Context
- func NewConfigContext(ctx context.Context, v *Config) context.Context
- func OpenInBrowser(n *github.Notification) tea.Cmd
- func Unsubscribe(n *github.Notification) tea.Cmd
- func Unwatch(owner, repo string) tea.Cmd
- func Update(ctx context.Context, msg tea.Msg, model tea.Model) (tea.Model, tea.Cmd)
- func UpdateNotificationLabels(n *github.Notification, issue *github.Issue, labels []string) tea.Cmd
- func UpdateNotificationPriority(n *github.Notification, issue *github.Issue, name string) tea.Cmd
- func View(ctx context.Context, model tea.Model) string
- type CommentAdded
- type Config
- type GotDimensions
- type LabelsLoaded
- type MarkedAsRead
- type Model
- type NotificationCommentsLoaded
- type NotificationIssueLoaded
- type NotificationLabelsLoaded
- type NotificationLabelsUpdated
- type NotificationPriorityUpdated
- type NotificationsLoaded
- type Page
- type Priority
- type Unsubscribed
- type Unwatched
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddComment ¶
func AddComment(n *github.Notification, issue *github.Issue, comment string) tea.Cmd
AddComment adds a comment to an issue.
func ClientFromContext ¶
ClientFromContext returns client from context.
func GetDimensions ¶
GetDimensions requests the terminal dimensions.
func LoadNotification ¶
func LoadNotification(n *github.Notification) tea.Cmd
LoadNotification loads a notification's issue, labels, and comments.
func LoadNotificationComments ¶
LoadNotificationComments loads a notification's comments.
func LoadNotificationIssue ¶
func LoadNotificationIssue(n *github.Notification) tea.Cmd
LoadNotificationIssue loads a notification's issue.
func LoadNotificationLabels ¶
func LoadNotificationLabels(n *github.Notification, issue *github.Issue) tea.Cmd
LoadNotificationLabels loads a notification's labels.
func LoadNotifications ¶
LoadNotifications loads the notifications.
func LoadRepoLabels ¶
func LoadRepoLabels(n *github.Notification) tea.Cmd
LoadRepoLabels loads a repo's labels.
func MarkAsRead ¶
func MarkAsRead(n *github.Notification) tea.Cmd
MarkAsRead marks an issue as read.
func MustClientFromContext ¶
MustClientFromContext returns client from context.
func NewClientContext ¶
NewClientContext returns a new context with client.
func NewConfigContext ¶
NewConfigContext returns a new context with config.
func OpenInBrowser ¶
func OpenInBrowser(n *github.Notification) tea.Cmd
OpenInBrowser opens the in the browser.
func Unsubscribe ¶
func Unsubscribe(n *github.Notification) tea.Cmd
Unsubscribe unsubscribes from the issue, and marks it as read.
func Unwatch ¶
func Unwatch(owner, repo string) tea.Cmd
Unwatch unwatches the repository, and marks it as read.
func UpdateNotificationLabels ¶
func UpdateNotificationLabels(n *github.Notification, issue *github.Issue, labels []string) tea.Cmd
UpdateNotificationLabels updates an issue's labels.
func UpdateNotificationPriority ¶
func UpdateNotificationPriority(n *github.Notification, issue *github.Issue, name string) tea.Cmd
UpdateNotificationPriority updates an issue's priority by name.
Types ¶
type Config ¶
type Config struct { // Priorities is a set of priorities used in assigning. By default // low, medium, and high are provided. Priorities []Priority // Theme is style related configuration. Theme struct { // Code is the syntax theme used for highlighting blocks of code. Code *termd.SyntaxTheme `json:"code"` } `json:"theme"` }
Config is the user configuration.
func ConfigFromContext ¶
ConfigFromContext returns config from context.
func MustConfigFromContext ¶
MustConfigFromContext returns config from context.
type Model ¶
type Model struct { // active page Page // notifications page Notifications []*github.Notification NotificationsScrollY int Selected int Searching bool SearchInput input.Model // notification page Notification *github.Notification NotificationScrollY int Labels []*github.Label Issue *github.Issue Comments []*github.IssueComment LoadingIssue bool LoadingLabels bool LoadingComments bool // priorities page PriorityOptions option.Model // labels page LabelOptions options.Model RepoLabels []*github.Label // comment CommentInput input.Model // shared MarkingAsRead bool Unsubscribing bool Unwatching bool Loading bool Width int Height int }
Model is the application model.
type NotificationCommentsLoaded ¶
type NotificationCommentsLoaded struct {
Comments []*github.IssueComment
}
NotificationCommentsLoaded msg.
type NotificationIssueLoaded ¶
NotificationIssueLoaded msg.
type NotificationLabelsLoaded ¶
NotificationLabelsLoaded msg.
type NotificationLabelsUpdated ¶
type NotificationLabelsUpdated struct{}
NotificationLabelsUpdated msg.
type NotificationPriorityUpdated ¶
type NotificationPriorityUpdated struct{}
NotificationPriorityUpdated msg.
type NotificationsLoaded ¶
type NotificationsLoaded struct {
Notifications []*github.Notification
}
NotificationsLoaded msg.