Documentation
¶
Overview ¶
Package prcache provides PR status caching stored in ~/.wt/prs.json. PRs are stored independently of worktree entries, keyed by repoPath:branch, allowing PR info to be cached before worktrees are created.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
type Cache struct {
PRs map[string]*forge.PRInfo `json:"prs"`
// contains filtered or unexported fields
}
Cache stores PR info keyed by repoPath:branch
func Load ¶
func Load() *Cache
Load loads the PR cache from disk. Returns an empty cache if the file is missing or corrupted.
func LoadFrom ¶ added in v0.23.0
LoadFrom loads the PR cache from the given path. Returns an empty cache if the file is missing or corrupted.
func (*Cache) SaveIfDirty ¶ added in v0.17.0
SaveIfDirty saves the cache to disk only if it has been modified. Resets the dirty flag after a successful save.
Click to show internal directories.
Click to hide internal directories.