Skip to content

Commit 4e79336

Browse files
committed
feat: log from to
1 parent 2690142 commit 4e79336

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

internal/cli/action_generate.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
"github.com/urfave/cli/v2"
1515
"golang.org/x/mod/semver"
1616

17+
"github.com/make-go-great/color-go"
1718
"github.com/make-go-great/ioe-go"
1819
"github.com/make-go-great/markdown-go"
1920
"github.com/make-go-great/rst-go"
@@ -68,6 +69,18 @@ func (a *action) RunGenerate(c *cli.Context) error {
6869
}
6970
}
7071

72+
aliasFrom := a.flags.from
73+
if aliasFrom == "" {
74+
aliasFrom = "latest"
75+
}
76+
77+
aliasTo := a.flags.to
78+
if aliasTo == "" {
79+
aliasTo = "earliest"
80+
}
81+
82+
color.PrintAppOK(name, fmt.Sprintf("Generate changelog from [%s] to [%s]", aliasFrom, aliasTo))
83+
7184
commits, err := repo.Log(a.flags.from, a.flags.to)
7285
if err != nil {
7386
return err

0 commit comments

Comments
 (0)