Documentation ¶
Index ¶
- func AllBranchType() []string
- func AllCommitType() []string
- func BranchName(btype BranchType, description string, username string) string
- func ColorizeCommitType(s string, ct CommitType) string
- func CommitMessage(o *CommitMessageOption) string
- type BranchType
- type CommitMessageOption
- type CommitType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllBranchType ¶
func AllBranchType() []string
func AllCommitType ¶
func AllCommitType() []string
func BranchName ¶
func BranchName(btype BranchType, description string, username string) string
func ColorizeCommitType ¶ added in v1.2.0
func ColorizeCommitType(s string, ct CommitType) string
func CommitMessage ¶
func CommitMessage(o *CommitMessageOption) string
Format commit message according to https://www.conventionalcommits.org/en/v1.0.0/
Types ¶
type BranchType ¶
type BranchType int
const ( FeatureBranch BranchType = iota FixBranch UserBranch )
func BranchTypeFrom ¶
func BranchTypeFrom(str string) (BranchType, error)
func (BranchType) String ¶
func (b BranchType) String() string
type CommitMessageOption ¶
type CommitMessageOption struct { // Commit type (optional) Ctype CommitType // Commit scope (optional) Scope string // Commit subject (required) Description string // Commit body (optional) Body string Footers []string // Breaking change flag (optional) BreakingChanges bool }
func ParseCommitMsg ¶ added in v1.1.0
func ParseCommitMsg(msg string) *CommitMessageOption
type CommitType ¶
type CommitType int
const ( BuildCommit CommitType = iota CiCommit ChoreCommit DocCommit FeatureCommit FixCommit NilCommit PerfCommit RefactorCommit StyleCommit TestCommit )
func (CommitType) String ¶
func (b CommitType) String() string
Click to show internal directories.
Click to hide internal directories.