From 8dcd2c1fd1d554f142a69564f04519a11309aa4f Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Tue, 12 Dec 2023 13:19:46 -0800 Subject: [PATCH] [chore] add @ symbol to github usernames in distro maintainers (#29804) Follow up of #29697 --- .github/CODEOWNERS | 2 +- cmd/githubgen/codeowners.go | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e5538cab31b8..23364282da1b 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -282,7 +282,7 @@ reports/distributions/aws.yaml @open-telemetry/collector-contrib-approvers reports/distributions/grafana.yaml @open-telemetry/collector-contrib-approvers reports/distributions/observiq.yaml @open-telemetry/collector-contrib-approvers reports/distributions/redhat.yaml @open-telemetry/collector-contrib-approvers -reports/distributions/splunk.yaml @open-telemetry/collector-contrib-approvers atoulme dmitryax hughesjj rfitzpatrick +reports/distributions/splunk.yaml @open-telemetry/collector-contrib-approvers @atoulme @crobert-1 @dmitryax @hughesjj @jeffreyc-splunk @jinja2 @jvoravong @panotti @rmfitzpatrick @samiura reports/distributions/sumo.yaml @open-telemetry/collector-contrib-approvers reports/distributions/liatrio.yaml @open-telemetry/collector-contrib-approvers diff --git a/cmd/githubgen/codeowners.go b/cmd/githubgen/codeowners.go index 39f1d373e8b1..4df9c3c66921 100644 --- a/cmd/githubgen/codeowners.go +++ b/cmd/githubgen/codeowners.go @@ -155,8 +155,13 @@ LOOP: longestName = len(dist.Name) } } + for _, dist := range data.distributions { - 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(dist.Maintainers, " ")) + var maintainers []string + 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, " ")) } err = os.WriteFile(filepath.Join(".github", "CODEOWNERS"), []byte(codeowners+unmaintainedCodeowners), 0600)