release

package
v0.0.0-...-ef91c64 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPlatformDetectionFailed = errors.New("failed to detect platform")

Functions

func DetectPlatform

func DetectPlatform() (string, error)

func GenerateReleaseNotes

func GenerateReleaseNotes(commits []*semrel.Commit, filters *Filters, matchRules []*MatchRule) string

func NewGithubReleaser

func NewGithubReleaser(token, owner, repo, branch string) (*githubReleaser, error)

func NewGitlabReleaser

func NewGitlabReleaser(token, projectID, branch string) (*gitlabReleaser, error)

Types

type ErrUnsupportedPlatform

type ErrUnsupportedPlatform struct {
	// contains filtered or unexported fields
}

func NewErrUnsupportedPlatform

func NewErrUnsupportedPlatform(platform string) *ErrUnsupportedPlatform

func (*ErrUnsupportedPlatform) Error

func (e *ErrUnsupportedPlatform) Error() string

type Filters

type Filters struct {
	Types  []string
	Scopes []string
}

Filters matches types and scopes in conventional commits, and excludes them from release notes.

func (*Filters) MatchScope

func (f *Filters) MatchScope(s string) bool

func (*Filters) MatchType

func (f *Filters) MatchType(t string) bool

type MatchRule

type MatchRule struct {
	Match   *regexp.Regexp
	Replace string
}

MatchRule holds one regex + replacement template.

func NewMatchRule

func NewMatchRule(pattern, replace string) (*MatchRule, error)

NewMatchRule creates a new MatchRule with the given regex pattern and replacement template.

func (*MatchRule) Apply

func (r *MatchRule) Apply(s string) string

Apply runs the regex on s, substituting every match according to the Replace template (using $1, $2, … for capture groups).

type Releaser

type Releaser interface {
	Release(tag, notes string) error
}

func Platform

func Platform(platform, token, projectID, branch string) (Releaser, error)

Jump to

Keyboard shortcuts

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