Documentation ¶
Index ¶
- Variables
- func FilterTags(g gitclient.Interface, dir string, filter string) ([]string, error)
- func GenerateMarkdown(releaseSpec *v1.ReleaseSpec, gitInfo *giturl.GitRepository) (string, error)
- func GetCommitPointedToByLatestTag(g gitclient.Interface, dir string) (string, string, error)
- func GetCommitPointedToByPreviousTag(g gitclient.Interface, dir string) (string, string, error)
- func GetFirstCommitSha(g gitclient.Interface, dir string) (string, error)
- func GetRevisionBeforeDateText(g gitclient.Interface, dir string, dateText string) (string, error)
- func NthTag(g gitclient.Interface, dir string, n int) (string, string, error)
- type CommitGroup
- type CommitInfo
- type GroupAndCommitInfos
Constants ¶
This section is empty.
Variables ¶
var ( // ConventionalCommitTitles textual descriptions for // Conventional Commit types: https://conventionalcommits.org/ ConventionalCommitTitles = map[string]*CommitGroup{ "feat": createCommitGroup("New Features"), "fix": createCommitGroup("Bug Fixes"), "perf": createCommitGroup("Performance Improvements"), "refactor": createCommitGroup("Code Refactoring"), "docs": createCommitGroup("Documentation"), "test": createCommitGroup("Tests"), "revert": createCommitGroup("Reverts"), "style": createCommitGroup("Styles"), "chore": createCommitGroup("Chores"), "": createCommitGroup(""), } )
Functions ¶
func FilterTags ¶
FilterTags returns all tags from the repository at the given directory that match the filter
func GenerateMarkdown ¶
func GenerateMarkdown(releaseSpec *v1.ReleaseSpec, gitInfo *giturl.GitRepository) (string, error)
GenerateMarkdown generates the markdown document for the commits
func GetCommitPointedToByLatestTag ¶
GetCommitPointedToByLatestTag return the SHA of the commit pointed to by the latest git tag as well as the tag name for the git repo in dir
func GetCommitPointedToByPreviousTag ¶
GetCommitPointedToByPreviousTag return the SHA of the commit pointed to by the latest-but-1 git tag as well as the tag name for the git repo in dir
func GetFirstCommitSha ¶
GetFirstCommitSha returns the sha of the first commit
func GetRevisionBeforeDateText ¶
GetRevisionBeforeDateText returns the revision before the given date in format "MonthName dayNumber year"
Types ¶
type CommitGroup ¶
type CommitInfo ¶
type CommitInfo struct { Kind string Feature string Message string // contains filtered or unexported fields }
func ParseCommit ¶
func ParseCommit(message string) *CommitInfo
ParseCommit parses a conventional commit see: https://conventionalcommits.org/
func (*CommitInfo) Group ¶
func (c *CommitInfo) Group() *CommitGroup
func (*CommitInfo) Order ¶
func (c *CommitInfo) Order() int
func (*CommitInfo) Title ¶
func (c *CommitInfo) Title() string
type GroupAndCommitInfos ¶
type GroupAndCommitInfos struct {
// contains filtered or unexported fields
}