feat: log from to

main
sudo pacman -Syu 2023-07-16 21:08:19 +07:00
parent 2690142440
commit 4e793364bd
1 changed files with 13 additions and 0 deletions

View File

@ -14,6 +14,7 @@ import (
"github.com/urfave/cli/v2"
"golang.org/x/mod/semver"
"github.com/make-go-great/color-go"
"github.com/make-go-great/ioe-go"
"github.com/make-go-great/markdown-go"
"github.com/make-go-great/rst-go"
@ -68,6 +69,18 @@ func (a *action) RunGenerate(c *cli.Context) error {
}
}
aliasFrom := a.flags.from
if aliasFrom == "" {
aliasFrom = "latest"
}
aliasTo := a.flags.to
if aliasTo == "" {
aliasTo = "earliest"
}
color.PrintAppOK(name, fmt.Sprintf("Generate changelog from [%s] to [%s]", aliasFrom, aliasTo))
commits, err := repo.Log(a.flags.from, a.flags.to)
if err != nil {
return err