pkg

package
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WordLists = make(map[string][]string)

Functions

func CheckFilter

func CheckFilter(ctx context.Context, filter *config.FilterConfig, in string) bool

func CheckFilters

func CheckFilters(ctx context.Context, branches *config.FilterConfig, tags *config.FilterConfig) bool

func ColorName added in v1.18.0

func ColorName(s string) string

func FindGitDir

func FindGitDir(_ context.Context) string

func Name

func Name(_ context.Context, segments ...string) string

func NewLogTailer added in v1.18.0

func NewLogTailer(output io.Writer, prefix string) io.Writer

func PadName added in v1.18.0

func PadName(s string, n int) string

func Run

func Run(ctx context.Context, cmd *config.RunConfig, cfg *config.Config) error

func TagCommits

func TagCommits(_ context.Context, commits []*Commit, tags map[string]string)

Types

type Branch

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

func (Branch) GetHash

func (b Branch) GetHash() string

func (Branch) GetName

func (b Branch) GetName() string

func (Branch) IsBranch

func (b Branch) IsBranch() bool

func (Branch) IsTag

func (b Branch) IsTag() bool

type Changelog

type Changelog struct {
	Repository string
	Releases   []*ChangelogRelease
}

func MakeChangelog

func MakeChangelog(_ context.Context, repository string, releases []*Release) (*Changelog, error)

type ChangelogRelease

type ChangelogRelease struct {
	Version         string
	PreviousVersion string
	Date            string
	Timestamp       time.Time
	Sections        []*ReleaseSection
	FirstCommitHash string
	LastCommitHash  string
	IsNew           bool
}

type Commit

type Commit struct {
	Hash          string
	PreviousHash  string
	NextHash      string
	When          time.Time
	Message       *Message
	Tag           string
	AffectedPaths []string
}

func (Commit) ShortHash

func (c Commit) ShortHash() string

func (Commit) Title

func (c Commit) Title() string

type CommitType

type CommitType string

func GetCommitTypes

func GetCommitTypes() []CommitType

func NewType

func NewType(s string) CommitType

func (CommitType) Description

func (t CommitType) Description() string

func (CommitType) IsMinor

func (t CommitType) IsMinor() bool

func (CommitType) IsPatch

func (t CommitType) IsPatch() bool

func (CommitType) String

func (t CommitType) String() string

func (CommitType) Title

func (t CommitType) Title() string

type Git

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

func NewGit

func NewGit(_ context.Context, dir string) (*Git, error)

func (Git) GetCommits

func (g Git) GetCommits(ctx context.Context) ([]*Commit, error)

func (Git) GetHead

func (g Git) GetHead(_ context.Context) (GitRef, error)

func (Git) GetTags

func (g Git) GetTags(_ context.Context) (map[string]string, error)

type GitHub

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

func NewGitHub

func NewGitHub(ctx context.Context, url string) (*GitHub, error)

func (GitHub) CreateRelease

func (g GitHub) CreateRelease(ctx context.Context, tag string, body string, ref *string) (*github.RepositoryRelease, error)

func (GitHub) GetCommits

func (g GitHub) GetCommits(ctx context.Context) ([]*Commit, error)

func (GitHub) GetTags

func (g GitHub) GetTags(ctx context.Context) (map[string]string, error)

func (GitHub) UploadAsset

func (g GitHub) UploadAsset(ctx context.Context, relID int64, artifact string) error

type GitRef

type GitRef interface {
	GetName() string
	GetHash() string
	IsBranch() bool
	IsTag() bool
}

type GoMod

type GoMod struct {
	Module  Module    `json:"module"`
	Go      string    `json:"go"`
	Require []Require `json:"require"`
	Exclude []Module  `json:"exclude"`
	Replace []Replace `json:"replace"`
}

func LoadGoModuleDefinition

func LoadGoModuleDefinition(ctx context.Context, dir string) (*GoMod, error)

LoadGoModuleDefinition loads the go.mod definition in a given directory

type LogTailer added in v1.18.0

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

func (*LogTailer) Write added in v1.18.0

func (l *LogTailer) Write(p []byte) (n int, err error)

type Message

type Message struct {
	Type            CommitType
	IsBreaking      bool
	Scope           string
	Subject         string
	Body            string
	BreakingMessage string
}

func ParseMessage

func ParseMessage(message string) *Message

func (Message) ScopePrefix

func (m Message) ScopePrefix() string

func (Message) Title

func (m Message) Title() string

type Module

type Module struct {
	Path    string `json:"path"`
	Version string `json:"version"`
}

type Release

type Release struct {
	Version         string
	PreviousVersion string
	Date            time.Time
	Commits         map[CommitType][]*Commit
	FirstCommitHash string
	LastCommitHash  string
	IsNew           bool
}

func MakeReleases

func MakeReleases(_ context.Context, commits []*Commit, makeRelease bool) ([]*Release, error)

type ReleaseSection

type ReleaseSection struct {
	Title      string
	IsBreaking bool
	Commits    []*Commit
}

type Replace

type Replace struct {
	Old Module `json:"old"`
	New Module `json:"new"`
}

type Repository

type Repository interface {
	GetTags(ctx context.Context) (map[string]string, error)
	GetCommits(ctx context.Context) ([]*Commit, error)
}

type Require

type Require struct {
	Path     string `json:"path"`
	Version  string `json:"version"`
	Indirect bool   `json:"indirect"`
}

type Tag

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

func (Tag) GetHash

func (b Tag) GetHash() string

func (Tag) GetName

func (b Tag) GetName() string

func (Tag) IsBranch

func (b Tag) IsBranch() bool

func (Tag) IsTag

func (b Tag) IsTag() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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