Documentation
¶
Overview ¶
Package config loads and saves triage's settings and knows where triage keeps its files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶ added in v0.2.0
type Config struct {
// Repos are the repositories triage tracks, in owner/name form.
Repos []string `toml:"repos"`
// DefaultRepo receives new issues when triage can't tell which repo you
// mean from the current directory.
DefaultRepo string `toml:"default_repo,omitempty"`
// RefreshMinutes is how often the app checks GitHub for changes.
RefreshMinutes int `toml:"refresh_minutes,omitempty"`
// Labels names the labels that carry type and status.
Labels issue.Convention `toml:"labels"`
// RepoColors picks colors for repos, by palette name or #rrggbb.
RepoColors map[string]string `toml:"repo_colors,omitempty"`
// ReduceMotion turns off animations such as the row glow and spinners.
ReduceMotion bool `toml:"reduce_motion,omitempty"`
// Views are extra saved filters shown after the built-in ones.
Views []View `toml:"views,omitempty"`
}
Config is the contents of config.toml.
func Default ¶ added in v0.2.0
func Default() Config
Default returns the configuration used before the user sets anything.
func Load ¶ added in v0.2.0
Load reads the config file. A missing file returns Default() and exists=false.
func (Config) RefreshInterval ¶ added in v0.2.0
RefreshInterval returns how often to poll GitHub.
func (*Config) RemoveRepo ¶ added in v0.2.0
RemoveRepo stops tracking repo; it reports whether repo was tracked.
type Paths ¶ added in v0.2.0
type Paths struct {
// ConfigDir holds config.toml and the outbox of unsent changes.
ConfigDir string
// CacheDir holds cached issues; deleting it loses nothing.
CacheDir string
}
Paths are the locations triage reads and writes.
func DefaultPaths ¶ added in v0.2.0
DefaultPaths returns the OS-specific locations, overridable with TRIAGE_CONFIG_DIR and TRIAGE_CACHE_DIR.
func (Paths) ConfigFile ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.