Skip un-grouped PRs if no default is set

Signed-off-by: jolheiser <john.olheiser@gmail.com>
This commit is contained in:
jolheiser 2022-06-21 21:44:50 -05:00
parent 57e620da5b
commit 793187c10d
No known key found for this signature in database
GPG Key ID: B853ADA5DA7BBF7A
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