Documentation
¶
Overview ¶
Package home implements the Slack app home dashboard.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildBlocks ¶
BuildBlocks creates Slack Block Kit UI for the home dashboard. Design matches dashboard at https://reviewgoose.dev - modern minimal with indigo accents.
func BuildBlocksWithDebug ¶
func BuildBlocksWithDebug(dashboard *Dashboard, userTZ string, mapping *usermapping.ReverseMapping) []slack.Block
BuildBlocksWithDebug creates Slack Block Kit UI with GitHub username integrated into the header.
func BuildPRSections ¶
BuildPRSections creates Block Kit blocks for PR sections (incoming/outgoing). Format inspired by goose - simple, minimal, action-focused. This is the core formatting used by both daily reports and the dashboard.
Types ¶
type Dashboard ¶
type Dashboard struct {
IncomingPRs []PR
OutgoingPRs []PR
WorkspaceOrgs []string // Organizations tracked by this workspace
}
Dashboard contains all data needed to render the home tab.
type Fetcher ¶
type Fetcher struct {
// contains filtered or unexported fields
}
Fetcher retrieves and enriches PRs for the home dashboard.
func NewFetcher ¶
func NewFetcher(githubClient *github.Client, stateStore state.Store, githubToken, botUsername string) *Fetcher
NewFetcher creates a new PR fetcher.
func (*Fetcher) FetchDashboard ¶
func (f *Fetcher) FetchDashboard(ctx context.Context, githubUsername string, workspaceOrgs []string) (*Dashboard, error)
FetchDashboard fetches all PRs for a GitHub user across workspace organizations. Degrades gracefully - returns partial data on errors rather than failing completely.
type PR ¶
type PR struct {
UpdatedAt time.Time // Last time PR metadata was updated
LastEventTime time.Time // Last sprinkler event for turnclient cache optimization
Title string
URL string
Repository string // "owner/repo" format
Author string // GitHub username
ActionReason string // Human-readable reason from turnclient
ActionKind string // Action type: review, merge, fix_tests, etc.
TestState string // Test state: running, passing, failing
Number int
IsDraft bool
IsBlocked bool // Outgoing PRs - blocked on author
NeedsReview bool // Incoming PRs - needs user's review
}
PR represents a pull request for display in the home dashboard.