skip contributors with posterID = 0

Dawid Góra 2025-11-19 11:58:45 +01:00
parent 5337b76095
commit ed56c3b63a
1 changed files with 5 additions and 0 deletions

View File

@ -301,6 +301,11 @@ func collectContributors(ctx context.Context, repoID int64, prs []*issues_model.
poster := pr.Issue.Poster
posterID := poster.ID
if posterID == 0 {
// Migrated PRs may not have a linked local user (PosterID == 0). Skip them for now.
continue
}
if !seenContributors.Contains(posterID) {
contributors = append(contributors, poster)
seenContributors.Add(posterID)