config

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigFileName = ".release.yaml"

ConfigFileName is the expected config file name.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangelogConfig

type ChangelogConfig struct {
	Enabled  *bool  `yaml:"enabled"`
	File     string `yaml:"file"`
	Template string `yaml:"template"`
}

ChangelogConfig configures changelog generation.

type ChangesConfig added in v0.1.0

type ChangesConfig struct {
	Commits *CommitsConfig `yaml:"commits"`
}

ChangesConfig configures the source of release changes.

func (*ChangesConfig) CommitConventionParams added in v0.1.0

func (c *ChangesConfig) CommitConventionParams() (convention string, major, minor, patch []string)

CommitConventionParams returns the convention name and type mappings for commit parsing. When no commits config is present, returns empty convention with empty type lists.

func (*ChangesConfig) IsGroupedChangelog added in v0.1.0

func (c *ChangesConfig) IsGroupedChangelog() bool

IsGroupedChangelog returns true when a commit convention is configured, meaning the changelog should use grouped rendering.

type CommitTypesConfig

type CommitTypesConfig struct {
	Major []string `yaml:"major"`
	Minor []string `yaml:"minor"`
	Patch []string `yaml:"patch"`
}

CommitTypesConfig defines custom type-to-bump mappings.

type CommitsConfig

type CommitsConfig struct {
	Convention string            `yaml:"convention"`
	Types      CommitTypesConfig `yaml:"types"`
}

CommitsConfig configures commit-based change detection.

type Config

type Config struct {
	Project   string            `yaml:"project"`
	Name      string            `yaml:"name"`
	Modules   []string          `yaml:"modules"`
	Version   VersionConfig     `yaml:"version"`
	Changes   ChangesConfig     `yaml:"changes"`
	Changelog ChangelogConfig   `yaml:"changelog"`
	Propagate []PropagateTarget `yaml:"propagate"`
	Hooks     HooksConfig       `yaml:"hooks"`
	Publish   PublishConfig     `yaml:"publish"`
	Notify    NotifyConfig      `yaml:"notify"`
}

Config represents the full .release.yaml configuration.

func Load

func Load(dir string) (*Config, []string, error)

Load reads and parses the .release.yaml config from the given directory. Returns the parsed config, any warnings, and an error if loading fails.

func (*Config) IsContainer added in v0.4.0

func (c *Config) IsContainer() bool

IsContainer returns true when the config groups sub-projects without being a releasable unit itself (modules declared, project omitted).

func (*Config) IsMonorepo added in v0.3.0

func (c *Config) IsMonorepo() bool

IsMonorepo returns true when the config declares child modules.

type GitHubPublishConfig

type GitHubPublishConfig struct {
	Enabled   *bool    `yaml:"enabled"`
	Draft     bool     `yaml:"draft"`
	Artifacts []string `yaml:"artifacts"`
}

GitHubPublishConfig configures GitHub Releases publishing.

type HooksConfig

type HooksConfig struct {
	PreBump     string `yaml:"pre-bump"`
	PostBump    string `yaml:"post-bump"`
	PrePublish  string `yaml:"pre-publish"`
	PostPublish string `yaml:"post-publish"`
}

HooksConfig defines lifecycle hook commands.

type NotifyConfig

type NotifyConfig struct {
	Slack   *SlackNotifyConfig   `yaml:"slack"`
	Webhook *WebhookNotifyConfig `yaml:"webhook"`
}

NotifyConfig configures notification targets.

type PropagateTarget

type PropagateTarget struct {
	File    string `yaml:"file"`
	Type    string `yaml:"type"`
	Field   string `yaml:"field"`
	Pattern string `yaml:"pattern"`
}

PropagateTarget defines a file where the version should be propagated.

type PublishConfig

type PublishConfig struct {
	GitHub GitHubPublishConfig `yaml:"github"`
}

PublishConfig configures publish targets.

type SlackNotifyConfig

type SlackNotifyConfig struct {
	Webhook string `yaml:"webhook"`
	Channel string `yaml:"channel"`
}

SlackNotifyConfig configures Slack notifications.

type VersionConfig

type VersionConfig struct {
	Scheme   string `yaml:"scheme"`
	Snapshot bool   `yaml:"snapshot"`
	Manifest string `yaml:"manifest"`
	Field    string `yaml:"field"`
	Pattern  string `yaml:"pattern"`
}

VersionConfig configures version management.

type WebhookNotifyConfig

type WebhookNotifyConfig struct {
	URL string `yaml:"url"`
}

WebhookNotifyConfig configures generic webhook notifications.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL