Merge pull request #5 from lunny/lunny/ignore_empty_group

ignore empty group
This commit is contained in:
Lunny Xiao 2017-09-04 22:40:54 +08:00 committed by GitHub
commit a4d8876f9b
1 changed files with 4 additions and 0 deletions

View File

@ -186,6 +186,10 @@ func runGenerate(cmd *cli.Context) {
fmt.Printf("## [%s](https://github.com/%s/releases/tag/v%s) - %s\n", milestone, config.Repo, milestone, time.Now().Format("2006-01-02"))
for _, g := range config.Groups {
if len(changelogs[g.Name]) == 0 {
continue
}
fmt.Println("* " + g.Name)
for _, pr := range changelogs[g.Name] {
fmt.Printf(" * %s (#%d)\n", *pr.Title, *pr.Number)