feat: Add --tag-filter-pattern flag.

This flag specifies a regular expression and only matched tags will
be included in change log.

Closes #43
This commit is contained in:
Chao Li 2019-07-04 11:40:48 +08:00
parent 63a4e63702
commit 1198e283de
10 changed files with 222 additions and 65 deletions

View file

@ -18,6 +18,7 @@ import (
type Options struct {
Processor Processor
NextTag string // Treat unreleased commits as specified tags (EXPERIMENTAL)
TagFilterPattern string // Filter tag by regexp
CommitFilters map[string][]string // Filter by using `Commit` properties and values. Filtering is not done by specifying an empty value
CommitSortBy string // Property name to use for sorting `Commit` (e.g. `Scope`)
CommitGroupBy string // Property name of `Commit` to be grouped into `CommitGroup` (e.g. `Type`)
@ -108,7 +109,7 @@ func NewGenerator(config *Config) *Generator {
return &Generator{
client: client,
config: config,
tagReader: newTagReader(client),
tagReader: newTagReader(client, config.Options.TagFilterPattern),
tagSelector: newTagSelector(),
commitParser: newCommitParser(client, config),
commitExtractor: newCommitExtractor(config.Options),