-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add --tag-filter-pattern flag.
This flag specifies a regular expression and only matched tags will be included in change log. Closes #43
- Loading branch information
1 parent
63a4e63
commit 1198e28
Showing
10 changed files
with
225 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/stretchr/testify/assert" | ||
"github.com/urfave/cli" | ||
"testing" | ||
) | ||
|
||
var gAssert *assert.Assertions | ||
|
||
func mock_app_action(c *cli.Context) error { | ||
assert := gAssert | ||
assert.Equal("c.yml", c.String("config")) | ||
assert.Equal("^v", c.String("tag-filter-pattern")) | ||
assert.Equal("o.md", c.String("output")) | ||
assert.Equal("v5", c.String("next-tag")) | ||
assert.True(c.Bool("silent")) | ||
assert.True(c.Bool("no-color")) | ||
assert.True(c.Bool("no-emoji")) | ||
return nil | ||
} | ||
|
||
func TestCreateApp(t *testing.T) { | ||
assert := assert.New(t) | ||
assert.True(true) | ||
gAssert = assert | ||
|
||
app := CreateApp(mock_app_action) | ||
args := []string { | ||
"git-chglog", | ||
"--silent", | ||
"--no-color", | ||
"--no-emoji", | ||
"--config", "c.yml", | ||
"--output", "o.md", | ||
"--next-tag", "v5", | ||
"--tag-filter-pattern", "^v", | ||
} | ||
app.Run(args) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.