internal

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectReleaseCommit

func DetectReleaseCommit(commit string, merge bool) (vPrefix string, major, minor, patch int)

Types

type Backend

type Backend interface {
	transport.AuthMethod
	Release(tag, ref, changelog string) error
	MergeRequest(target, title, description, labels string) error
	CloseMergeRequest() error
	MainBranch() (string, error)
}

type CommitType

type CommitType string
const (
	TypeFix      CommitType = "fix"
	TypeFeat     CommitType = "feat"
	TypeTest     CommitType = "test"
	TypeChore    CommitType = "chore"
	TypeOps      CommitType = "ops"
	TypeDocs     CommitType = "docs"
	TypePerf     CommitType = "perf"
	TypeRefactor CommitType = "refactor"
	TypeSecurity CommitType = "security"
	TypeOther    CommitType = "other"
)

func ParseCommitMessage

func ParseCommitMessage(msg string) (CommitType, string, string, bool)

type Github

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

func NewGithubBackend

func NewGithubBackend(token, repo string) Github

func (Github) CloseMergeRequest

func (github Github) CloseMergeRequest() error

func (Github) MainBranch

func (github Github) MainBranch() (string, error)

func (Github) MergeRequest

func (github Github) MergeRequest(target, title, description, labels string) error

func (Github) Name

func (github Github) Name() string

func (Github) Release

func (github Github) Release(tag, ref, changelog string) error

func (Github) SetAuth

func (github Github) SetAuth(r *http.Request)

func (Github) String

func (github Github) String() string

type Gitlab

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

func NewGitlabBackend

func NewGitlabBackend(token, server, repo string) Gitlab

func (Gitlab) CloseMergeRequest

func (gitlab Gitlab) CloseMergeRequest() error

func (Gitlab) MainBranch

func (gitlab Gitlab) MainBranch() (string, error)

func (Gitlab) MergeRequest

func (gitlab Gitlab) MergeRequest(target, title, description, labels string) error

func (Gitlab) Name

func (gitlab Gitlab) Name() string

func (Gitlab) Release

func (gitlab Gitlab) Release(tag, ref, changelog string) error

func (Gitlab) SetAuth

func (gitlab Gitlab) SetAuth(r *http.Request)

func (Gitlab) String

func (gitlab Gitlab) String() string

type Repository

type Repository struct {
	Major, Minor, Patch int
	VPrefix             string
	Latest              string

	Features []string

	Breaking bool
	Details  []string
	// contains filtered or unexported fields
}

func ReadRepository

func ReadRepository(repo *git.Repository, createMajor bool) (*Repository, error)

func (*Repository) Changelog

func (repository *Repository) Changelog() string

func (*Repository) Release

func (repository *Repository) Release(backend Backend) error

func (*Repository) Version

func (repository *Repository) Version() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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