Compare commits
No commits in common. "60037a3996172e84c55d1cb16fc0cb2647477350" and "d401e4c9ff14c9e8f294923b5125744d48f004c1" have entirely different histories.
60037a3996
...
d401e4c9ff
|
@ -56,19 +56,17 @@ func updateOrCreateDraftRelease(a *Action, cfg *config.RepoConfig) (*gitea.Relea
|
|||
for _, pr := range prs {
|
||||
categorized := false
|
||||
for _, category := range cfg.Categories {
|
||||
if !categorized && prHasLabel(pr, category.Labels) {
|
||||
if !categorized && prHasLabel(prs, category.Labels) {
|
||||
categorizedPRs[category.Title] = append(categorizedPRs[category.Title], pr)
|
||||
categorized = true
|
||||
break // Break out of the category loop
|
||||
// Break after adding the PR to a category
|
||||
break
|
||||
}
|
||||
}
|
||||
if !categorized {
|
||||
// Add to a default category if not categorized
|
||||
categorizedPRs["Other Changes"] = append(categorizedPRs["Other Changes"], pr)
|
||||
}
|
||||
if categorized {
|
||||
break // Break out of the PR loop once categorized
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -167,7 +165,8 @@ func (a *Action) Run() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func prHasLabel(pr *gitea.PullRequest, labels []string) bool {
|
||||
func prHasLabel(prs []*gitea.PullRequest, labels []string) bool {
|
||||
for _, pr := range prs {
|
||||
for _, prLabel := range pr.Labels {
|
||||
for _, label := range labels {
|
||||
if prLabel.Name == label {
|
||||
|
@ -175,5 +174,6 @@ func prHasLabel(pr *gitea.PullRequest, labels []string) bool {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue