Documentation
¶
Index ¶
- Constants
- func Exists() bool
- func FindConfigPath() string
- type Config
- func (c *Config) GetFieldMetadata(fieldName string) *FieldMetadata
- func (c *Config) GetProjectID() string
- 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 FieldMetadata
- type FieldsMetadata
- type ProjectConfig
- type ProjectMetadata
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"`
Metadata *ConfigMetadata `yaml:"metadata,omitempty"`
}
Config represents the project configuration
func LoadConfig ¶
LoadConfig loads configuration from file with enhanced error handling
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) 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 FieldsMetadata `yaml:"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 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 FieldsMetadata ¶
type FieldsMetadata struct {
Status *FieldMetadata `yaml:"status,omitempty"`
Priority *FieldMetadata `yaml:"priority,omitempty"`
}
FieldsMetadata represents cached field metadata
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