Documentation ¶
Index ¶
- Variables
- func AddMarkdownChangelogNodesHead(itemNode []sample_mk.Node, changelogDesc ConventionalChangeLogDesc, ...) ([]sample_mk.Node, error)
- func AddMarkdownChangelogNodesTitle(itemNode []sample_mk.Node, gitHttpInfo convention.GitRepositoryHttpInfo, ...) ([]sample_mk.Node, error)
- func GenerateMarkdownNodes(gitHttpInfo convention.GitRepositoryHttpInfo, commits []convention.Commit, ...) ([]sample_mk.Node, []sample_mk.Node, error)
- func SortCommitsByLogSpec(commits map[string][]convention.Commit, ...) (*orderedmap.OrderedMap[string, []convention.Commit], error)
- type ConventionalChangeLogDesc
- type Reader
Constants ¶
This section is empty.
Variables ¶
View Source
var (
NotErrCommitsLenZero = fmt.Errorf("commits len is zero")
)
Functions ¶
func AddMarkdownChangelogNodesHead ¶
func AddMarkdownChangelogNodesHead( itemNode []sample_mk.Node, changelogDesc ConventionalChangeLogDesc, logSpec convention.ConventionalChangeLogSpec, ) ([]sample_mk.Node, error)
AddMarkdownChangelogNodesHead add title to markdown nodes
func AddMarkdownChangelogNodesTitle ¶
func AddMarkdownChangelogNodesTitle( itemNode []sample_mk.Node, gitHttpInfo convention.GitRepositoryHttpInfo, changelogDesc ConventionalChangeLogDesc, logSpec convention.ConventionalChangeLogSpec, ) ([]sample_mk.Node, error)
AddMarkdownChangelogNodesTitle add title to markdown nodes
func GenerateMarkdownNodes ¶
func GenerateMarkdownNodes( gitHttpInfo convention.GitRepositoryHttpInfo, commits []convention.Commit, logSpec convention.ConventionalChangeLogSpec, ) ([]sample_mk.Node, []sample_mk.Node, error)
GenerateMarkdownNodes
gitHttpInfo: git repo info by convention.GitRepositoryHttpInfo
changelogDesc: changelog desc by ConventionalChangeLogDesc
commit: commit list by []convention.Commit
logSpec: log spec by convention.ConventionalChangeLogSpec
return markdown nodes and feat nodes
func SortCommitsByLogSpec ¶
func SortCommitsByLogSpec(commits map[string][]convention.Commit, logSpec convention.ConventionalChangeLogSpec) (*orderedmap.OrderedMap[string, []convention.Commit], error)
Types ¶
type Reader ¶
type Reader interface { // HistoryFirstTagShort // return history first tag short not include convention.ConventionalChangeLogSpec TagPrefix HistoryFirstTagShort() string // HistoryFirstTag // return history first tag this will append convention.ConventionalChangeLogSpec TagPrefix HistoryFirstTag() string // HistoryFirstTitle // return history first title, title not contain ## or ### HistoryFirstTitle() string // HistoryFirstContent // return history first content without title HistoryFirstContent() string // HistoryFirstChangeUrl // return history first change url like https://github.com/convention-change/convention-change-log/compare/v1.0.0...v1.1.0 HistoryFirstChangeUrl() string // HistoryFirstNodes // return history first nodes contains title HistoryFirstNodes() []sample_mk.Node // HistoryNodes // full history Nodes HistoryNodes() []sample_mk.Node }
func NewReader ¶
func NewReader(path string, spec convention.ConventionalChangeLogSpec) (Reader, error)
NewReader path: string reader load ChangeLog.md path
spec: convention.ConventionalChangeLogSpec please use convention.DefaultConventionalChangeLogSpec or convention.LoadConventionalChangeLogSpecByData
Click to show internal directories.
Click to hide internal directories.