Documentation
¶
Index ¶
- Constants
- func Exists() bool
- func FindConfigPath() string
- type Config
- func (c *Config) GetAllFields() []FieldInfo
- func (c *Config) GetFieldByID(id string) *FieldInfo
- func (c *Config) GetFieldByName(name string) *FieldInfo
- func (c *Config) GetFieldMetadata(fieldName string) *FieldMetadata
- func (c *Config) GetProjectID() string
- func (c *Config) HasCachedFields() bool
- func (c *Config) LoadMetadata() (*ConfigMetadata, error)
- func (c *Config) Save(path string) error
- func (c *Config) SaveWithMetadata(path string) error
- func (c *Config) SetProjectID(id string)
- func (c *Config) Validate() error
- type ConfigMetadata
- type DefaultsConfig
- type Field
- type FieldInfo
- type FieldMetadata
- type FieldOption
- type ProjectConfig
- type ProjectMetadata
- type TriageApply
- type TriageConfig
- type TriageInteractive
Constants ¶
const ConfigFileName = ".gh-pm.yml"
Variables ¶
This section is empty.
Functions ¶
func FindConfigPath ¶
func FindConfigPath() string
FindConfigPath returns the path to the configuration file
Types ¶
type Config ¶
type Config struct {
Project ProjectConfig `yaml:"project"`
Repositories []string `yaml:"repositories"`
Defaults DefaultsConfig `yaml:"defaults"`
Fields map[string]Field `yaml:"fields"`
Triage map[string]TriageConfig `yaml:"triage,omitempty"`
Metadata *ConfigMetadata `yaml:"metadata,omitempty"`
}
Config represents the project configuration
func LoadConfig ¶
LoadConfig loads configuration from file with enhanced error handling
func (*Config) GetAllFields ¶ added in v0.5.0
GetAllFields returns all cached field information
func (*Config) GetFieldByID ¶ added in v0.5.0
GetFieldByID returns field information by ID
func (*Config) GetFieldByName ¶ added in v0.5.0
GetFieldByName returns field information by name
func (*Config) GetFieldMetadata ¶
func (c *Config) GetFieldMetadata(fieldName string) *FieldMetadata
GetFieldMetadata returns metadata for a specific field
func (*Config) GetProjectID ¶
GetProjectID returns the cached project ID if available
func (*Config) HasCachedFields ¶ added in v0.5.0
HasCachedFields returns true if field metadata is cached
func (*Config) LoadMetadata ¶
func (c *Config) LoadMetadata() (*ConfigMetadata, error)
LoadMetadata loads just the metadata section from configuration
func (*Config) SaveWithMetadata ¶
SaveWithMetadata saves configuration with metadata to file
func (*Config) SetProjectID ¶
SetProjectID sets the project ID in metadata
type ConfigMetadata ¶
type ConfigMetadata struct {
Project ProjectMetadata `yaml:"project"`
Fields []FieldInfo `yaml:"fields,omitempty"` // All project fields
}
ConfigMetadata represents cached project metadata
type DefaultsConfig ¶
type DefaultsConfig struct {
Priority string `yaml:"priority"`
Status string `yaml:"status"`
Labels []string `yaml:"labels"`
}
DefaultsConfig represents default values
type FieldInfo ¶ added in v0.5.0
type FieldInfo struct {
Name string `yaml:"name"`
ID string `yaml:"id"`
DataType string `yaml:"data_type"`
Options []FieldOption `yaml:"options,omitempty"`
}
FieldInfo represents complete field information
type FieldMetadata ¶
type FieldMetadata struct {
ID string `yaml:"id"` // Field ID
Options map[string]string `yaml:"options"` // name -> option ID
}
FieldMetadata represents cached field IDs and options
type FieldOption ¶ added in v0.5.0
FieldOption represents a field option
type ProjectConfig ¶
type ProjectConfig struct {
Name string `yaml:"name"`
Number int `yaml:"number,omitempty"`
Org string `yaml:"org,omitempty"`
Owner string `yaml:"owner,omitempty"` // Project owner username (for URL generation)
}
ProjectConfig represents project settings
type ProjectMetadata ¶
type ProjectMetadata struct {
ID string `yaml:"id"` // Node ID (e.g., "PVT_kwHOAAlRwM4A8arc")
}
ProjectMetadata represents cached project IDs
type TriageApply ¶ added in v0.3.0
type TriageApply struct {
Labels []string `yaml:"labels,omitempty"`
Fields map[string]string `yaml:"fields,omitempty"`
}
TriageApply represents what to apply during triage
type TriageConfig ¶ added in v0.3.0
type TriageConfig struct {
Query string `yaml:"query"`
Instruction string `yaml:"instruction,omitempty"`
Apply TriageApply `yaml:"apply"`
Interactive TriageInteractive `yaml:"interactive,omitempty"`
InteractiveFields map[string]bool `yaml:"-"` // Runtime only, not persisted
}
TriageConfig represents a triage configuration
type TriageInteractive ¶ added in v0.3.0
type TriageInteractive struct {
Status bool `yaml:"status,omitempty"`
Estimate bool `yaml:"estimate,omitempty"`
}
TriageInteractive represents interactive options for triage