Skip to content

Commit

Permalink
[ci] Update codeowners script
Browse files Browse the repository at this point in the history
* Fixup issue link to point to correct location.
* Remove `@jkroepke` from manual listing now that they are a member of `helm-chart-admins`.
* Fixup bash linting of `check-codeowners.sh`.

Signed-off-by: SuperQ <[email protected]>
  • Loading branch information
SuperQ committed Jan 19, 2025
1 parent d38cc0f commit 1b094e0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
10 changes: 5 additions & 5 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
# See https://github.com/scottrigby/prometheus-helm-charts/issues/12
# See https://github.com/prometheus-community/helm-charts/issues/12
# https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
# https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax

# The repo admins team will be the default owners for everything in the repo.
# Unless a later match takes precedence, they will be requested for review when someone opens a pull request.
* @prometheus-community/helm-charts-admins

/.github/workflows/ @prometheus-community/helm-charts-admins @jkroepke @GMartinez-Sisti
/renovate.json @prometheus-community/helm-charts-admins @jkroepke @GMartinez-Sisti
/.github/workflows/ @prometheus-community/helm-charts-admins @GMartinez-Sisti
/renovate.json @prometheus-community/helm-charts-admins @GMartinez-Sisti

/charts/alertmanager/ @monotek @naseemkullah
/charts/alertmanager-snmp-notifier/ @maxwo
/charts/jiralert/ @jkroepke @zanhsieh
/charts/kube-prometheus-stack/ @andrewgkew @gianrubio @gkarthiks @GMartinez-Sisti @jkroepke @QuentinBisson @scottrigby @Xtigyro
/charts/kube-state-metrics/ @dotdc @mrueg @tariq1890
/charts/prom-label-proxy/ @jkroepke
/charts/prometheus/ @gianrubio @naseemkullah @Xtigyro @zanhsieh @zeritti
/charts/prometheus-adapter/ @hectorj2f @mattiasgees @steven-sheehy
/charts/prometheus-blackbox-exporter/ @desaintmartin @gianrubio @monotek @rsotnychenko
/charts/prometheus-cloudwatch-exporter/ @asherf @gianrubio @torstenwalter
Expand All @@ -25,6 +23,7 @@
/charts/prometheus-druid-exporter/ @iamabhishek-dubey @sandy724
/charts/prometheus-elasticsearch-exporter/ @desaintmartin @svenmueller @zeritti
/charts/prometheus-fastly-exporter/ @arslanbekov
/charts/prometheus/ @gianrubio @naseemkullah @Xtigyro @zanhsieh @zeritti
/charts/prometheus-ipmi-exporter/ @lexfrei
/charts/prometheus-json-exporter/ @schmiddim @xiu @zanhsieh
/charts/prometheus-kafka-exporter/ @gkarthiks @golgoth31 @zeritti
Expand Down Expand Up @@ -54,3 +53,4 @@
/charts/prometheus-to-sd/ @acondrat
/charts/prometheus-windows-exporter/ @jkroepke
/charts/prometheus-yet-another-cloudwatch-exporter/ @cristiangreco @thomaspeitz
/charts/prom-label-proxy/ @jkroepke
24 changes: 14 additions & 10 deletions scripts/check-codeowners.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
#!/usr/bin/env bash

cat <<EOF
# See https://github.com/scottrigby/prometheus-helm-charts/issues/12
# See https://github.com/prometheus-community/helm-charts/issues/12
# https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
# https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
# The repo admins team will be the default owners for everything in the repo.
# Unless a later match takes precedence, they will be requested for review when someone opens a pull request.
* @prometheus-community/helm-charts-admins
/.github/workflows/ @prometheus-community/helm-charts-admins @jkroepke @GMartinez-Sisti
/renovate.json @prometheus-community/helm-charts-admins @jkroepke @GMartinez-Sisti
/.github/workflows/ @prometheus-community/helm-charts-admins @GMartinez-Sisti
/renovate.json @prometheus-community/helm-charts-admins @GMartinez-Sisti
EOF

for DIR in $(ls -1 -d ./charts/*)
do
FILE="$DIR/Chart.yaml"
DIR=$(echo $DIR | sed 's/^\.//')
MAINTAINERS=$(yq e '.maintainers.[].url' $FILE | sed 's!^https://github.com/!@!' | sort --ignore-case)
echo $DIR/ $MAINTAINERS
done
get_maintainers() {
local chart_file="$1"
yq e '.maintainers.[].url' "${chart_file}" |
sed 's!^https://github.com/!@!' |
sort --ignore-case
}

for chart_file in charts/*/Chart.yaml; do
maintainers="$(get_maintainers "${chart_file}")"
echo "/${chart_file/%Chart.yaml}" "${maintainers//[$'\r\n']/ }"
done | sort -k 1

0 comments on commit 1b094e0

Please sign in to comment.