Documentation
¶
Overview ¶
Package config handles parsing and validation of .yeet.yaml configuration files.
Index ¶
- Constants
- Variables
- func RepoPathContains(basePath, candidatePath string) bool
- type AutoMergeMethod
- type CalVerConfig
- type ChangelogConfig
- type Config
- type ProviderType
- type ReferencePattern
- type ReferencesConfig
- type ReleaseConfig
- type RepositoryConfig
- type ResolvedTarget
- type Target
- type TargetType
- type VersioningStrategy
Constants ¶
View Source
const DefaultFile = ".yeet.yaml"
View Source
const DefaultSchemaURL = "https://raw.githubusercontent.com/monkescience/yeet/main/yeet.schema.json"
View Source
const SchemaDirective = "# yaml-language-server: $schema=" + DefaultSchemaURL
Variables ¶
View Source
var ErrEmptyRepoPath = errors.New("must not be empty")
View Source
var ErrInvalidConfig = errors.New("invalid config")
View Source
var ErrPathMustBeRepoRelative = errors.New("must be repo-relative")
Functions ¶
func RepoPathContains ¶ added in v0.4.0
RepoPathContains reports whether candidatePath is inside basePath using repo-relative forward-slash semantics. A basePath of "." contains everything.
Types ¶
type AutoMergeMethod ¶ added in v0.1.2
type AutoMergeMethod string
const ( AutoMergeMethodAuto AutoMergeMethod = "auto" AutoMergeMethodSquash AutoMergeMethod = "squash" AutoMergeMethodRebase AutoMergeMethod = "rebase" AutoMergeMethodMerge AutoMergeMethod = "merge" )
type CalVerConfig ¶
type CalVerConfig struct {
Format string `yaml:"format"`
}
type ChangelogConfig ¶
type ChangelogConfig struct {
File string `yaml:"file"`
Include []string `yaml:"include"`
Sections map[string]string `yaml:"sections"`
References ReferencesConfig `yaml:"references"`
}
type Config ¶
type Config struct {
Versioning VersioningStrategy `yaml:"versioning"`
Branch string `yaml:"branch"`
Provider ProviderType `yaml:"provider"`
PreMajorBreakingBumpsMinor bool `yaml:"pre_major_breaking_bumps_minor"`
PreMajorFeaturesBumpPatch bool `yaml:"pre_major_features_bump_patch"`
Repository RepositoryConfig `yaml:"repository"`
VersionFiles []string `yaml:"version_files,omitempty"`
Release ReleaseConfig `yaml:"release"`
Changelog ChangelogConfig `yaml:"changelog"`
CalVer CalVerConfig `yaml:"calver"`
Targets map[string]Target `yaml:"targets"`
}
func (*Config) ResolvedTargets ¶ added in v0.4.0
func (c *Config) ResolvedTargets() (map[string]ResolvedTarget, error)
type ProviderType ¶
type ProviderType string
const ( ProviderAuto ProviderType = "auto" ProviderGitHub ProviderType = "github" ProviderGitLab ProviderType = "gitlab" )
type ReferencePattern ¶ added in v0.4.6
ReferencePattern matches issue references inline in commit descriptions.
type ReferencesConfig ¶ added in v0.4.6
type ReferencesConfig struct {
Patterns []ReferencePattern `yaml:"patterns,omitempty"`
}
ReferencesConfig controls how issue/ticket references are linked in changelogs.
type ReleaseConfig ¶
type ReleaseConfig struct {
SubjectIncludeBranch bool `yaml:"subject_include_branch"`
AutoMerge bool `yaml:"auto_merge"`
AutoMergeForce bool `yaml:"auto_merge_force"`
AutoMergeMethod AutoMergeMethod `yaml:"auto_merge_method"`
PRBodyHeader string `yaml:"pr_body_header"`
}
type RepositoryConfig ¶ added in v0.1.3
type ResolvedTarget ¶ added in v0.4.0
type ResolvedTarget struct {
ID string
Type TargetType
Path string
TagPrefix string
Versioning VersioningStrategy
PreMajorBreakingBumpsMinor bool
PreMajorFeaturesBumpPatch bool
VersionFiles []string
Changelog ChangelogConfig
CalVer CalVerConfig
ExcludePaths []string
Includes []string
}
type Target ¶ added in v0.4.0
type Target struct {
Type TargetType `yaml:"type"`
Path string `yaml:"path,omitempty"`
TagPrefix string `yaml:"tag_prefix,omitempty"`
Versioning VersioningStrategy `yaml:"versioning,omitempty"`
PreMajorBreakingBumpsMinor *bool `yaml:"pre_major_breaking_bumps_minor,omitempty"`
PreMajorFeaturesBumpPatch *bool `yaml:"pre_major_features_bump_patch,omitempty"`
VersionFiles []string `yaml:"version_files,omitempty"`
Changelog ChangelogConfig `yaml:"changelog,omitempty"`
CalVer CalVerConfig `yaml:"calver,omitempty"`
ExcludePaths []string `yaml:"exclude_paths,omitempty"`
Includes []string `yaml:"includes,omitempty"`
}
type TargetType ¶ added in v0.4.0
type TargetType string
const ( TargetTypePath TargetType = "path" TargetTypeDerived TargetType = "derived" )
type VersioningStrategy ¶
type VersioningStrategy string
const ( // VersioningSemver uses semantic versioning (MAJOR.MINOR.PATCH). VersioningSemver VersioningStrategy = "semver" // VersioningCalVer uses calendar versioning (e.g., YYYY.0M.MICRO). VersioningCalVer VersioningStrategy = "calver" )
Click to show internal directories.
Click to hide internal directories.