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:
John Olheiser 2022-06-22 17:16:56 +08:00 committed by 6543
parent 57e620da5b
commit 05a5366d7f
1 changed files with 4 additions and 1 deletions

View File

@ -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