forked from lunny/changelog
Skip un-grouped PRs if no default is set (#64)
Reviewed-on: https://gitea.com/gitea/changelog/pulls/64 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: 6543 <6543@obermui.de> Co-authored-by: John Olheiser <john+gitea@jolheiser.com> Co-committed-by: John Olheiser <john+gitea@jolheiser.com>
This commit is contained in:
parent
57e620da5b
commit
05a5366d7f
@ -44,7 +44,7 @@ func runGenerate(_ *cli.Context) error {
|
||||
}
|
||||
}
|
||||
if defaultGroup == "" {
|
||||
defaultGroup = cfg.Groups[len(cfg.Groups)-1].Name
|
||||
fmt.Println("<!-- WARNING - no default group found -->")
|
||||
}
|
||||
|
||||
entries := processPRs(prs, cfg.NameLabels(), defaultGroup, cfg.SkipRegex)
|
||||
@ -88,6 +88,9 @@ PRLoop: // labels in Go, let's get old school
|
||||
}
|
||||
}
|
||||
section := processSection(pr, order, defaultGroup)
|
||||
if section == "" {
|
||||
continue
|
||||
}
|
||||
entries[section] = append(entries[section], pr)
|
||||
}
|
||||
return entries
|
||||
|
Loading…
Reference in New Issue
Block a user