Skip to content

Commit

Permalink
[chore][githubgen] Fix code owner whitespace issues (#664)
Browse files Browse the repository at this point in the history
Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
  • Loading branch information
crobert-1 and mx-psi authored Jan 20, 2025
1 parent 3bff621 commit b29324c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion githubgen/codeowners.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,13 @@ LOOP:
for _, m := range dist.Maintainers {
maintainers = append(maintainers, fmt.Sprintf("@%s", m))
}
codeowners += fmt.Sprintf("reports/distributions/%s.yaml%s @open-telemetry/collector-contrib-approvers %s\n", dist.Name, strings.Repeat(" ", longestName-len(dist.Name)), strings.Join(maintainers, " "))

distribution := fmt.Sprintf("\nreports/distributions/%s.yaml%s @open-telemetry/collector-contrib-approvers", dist.Name, strings.Repeat(" ", longestName-len(dist.Name)))
if len(maintainers) > 0 {
distribution += fmt.Sprintf(" %s", strings.Join(maintainers, " "))
}

codeowners += distribution
}

err = os.WriteFile(filepath.Join(".github", "CODEOWNERS"), []byte(codeowners+unmaintainedCodeowners), 0o600)
Expand Down

0 comments on commit b29324c

Please sign in to comment.