Documentation
¶
Overview ¶
Package config contains tunk's configuration, as well as an abstraction for handling standard io.
Index ¶
- Variables
- type Config
- func (c Config) Debugf(msg string, args ...interface{})
- func (c Config) Errorf(msg string, args ...interface{})
- func (c Config) GetBranches() []string
- func (c Config) GetPolicies() []*Policy
- func (c Config) GetPolicy(name string) *Policy
- func (c Config) OverridesSet() bool
- func (c Config) Printf(msg string, args ...interface{})
- func (c Config) Validate() error
- func (c Config) Warning(msg string, args ...interface{})
- type Policy
- type TerminalIO
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTermIO = TerminalIO{ Stdin: os.Stdin, Stdout: os.Stdout, Stderr: os.Stderr, }
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { InCI bool `json:"ci,omitempty"` Debug bool `json:"debug,omitempty"` Dryrun bool `json:"dryrun,omitempty"` Quiet bool `json:"quiet,omitempty"` All bool `json:"all,omitempty"` Scope string `json:"scope,omitempty"` Name string `json:"name,omitempty"` Major bool `json:"major,omitempty"` Minor bool `json:"minor,omitempty"` Patch bool `json:"patch,omitempty"` Branches []string `json:"branches,omitempty"` ReleaseScopes []string `json:"release_scopes,omitempty"` Policies []string `json:"policies,omitempty"` CustomPolicies []Policy `json:"custom_policies,omitempty"` TagTemplate string `json:"tag_template,omitempty"` LogTemplate string `json:"log_template,omitempty"` NoEdit bool `json:"no_edit,omitempty"` AllowedScopes []string `json:"allowed_scopes,omitempty"` AllowedTypes []string `json:"allowed_types,omitempty"` Term TerminalIO `json:"-"` // IgnorePolicies ignores policy restrictions. Intended for testing only. IgnorePolicies bool `json:"-"` BranchesSet bool `json:"-"` }
func GetDefault ¶
func GetDefault() Config
func NewWithTerminalIO ¶
func NewWithTerminalIO(overrides *Config, termio *TerminalIO) Config
func (Config) GetBranches ¶
func (Config) GetPolicies ¶
func (Config) OverridesSet ¶
type Policy ¶
type Policy struct { Name string `json:"name"` SubjectRE string `json:"subject_regex"` BodyAnnotationStartRE string `json:"body_annotation_start_regex"` BreakingChangeTypes []string `json:"breaking_change_annotations"` CommitTypes map[string]string `json:"commit_types"` FallbackReleaseType string `json:"fallback_type,omitempty"` // contains filtered or unexported fields }
func (*Policy) GetBodyAnnotationRE ¶
func (*Policy) GetSubjectRE ¶
Click to show internal directories.
Click to hide internal directories.