home

package
v0.0.0-...-72f1ef6 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: GPL-3.0 Imports: 15 Imported by: ? 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 home implements the Slack app home dashboard.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildBlocks

func BuildBlocks(dashboard *Dashboard, userTZ string) []slack.Block

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

func BuildPRSections(incoming, outgoing []PR) []slack.Block

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.

func (*Dashboard) Counts

func (d *Dashboard) Counts() PRCounts

Counts returns summary counts for the dashboard.

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.

type PRCounts

type PRCounts struct {
	IncomingTotal   int
	IncomingBlocked int
	OutgoingTotal   int
	OutgoingBlocked int
}

PRCounts summarizes PR counts for display.

Jump to

Keyboard shortcuts

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