Documentation
¶
Overview ¶
Package prcache provides PR status caching stored in ~/.wt/prs.json. PRs are stored independently of worktree entries, keyed by folder name, allowing PR info to be cached before worktrees are created.
Index ¶
Constants ¶
View Source
const CacheMaxAge = 24 * time.Hour
CacheMaxAge is the maximum age of cached PR info before it's considered stale
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
Cache stores PR info keyed by folder name
type PRInfo ¶
type PRInfo struct {
Number int `json:"number"`
State string `json:"state"` // Normalized: OPEN, MERGED, CLOSED
IsDraft bool `json:"is_draft"` // true if PR is a draft
URL string `json:"url"`
Author string `json:"author"` // username/login
CommentCount int `json:"comment_count"` // number of comments
HasReviews bool `json:"has_reviews"` // any reviews submitted
IsApproved bool `json:"is_approved"` // approved status
CachedAt time.Time `json:"cached_at"`
Fetched bool `json:"fetched"` // true = API was queried (distinguishes "not fetched" from "no PR")
}
PRInfo represents pull request information
Click to show internal directories.
Click to hide internal directories.