Files
helm-charts/scripts/check-codeowners.sh
T
Torsten WalterandGitHub a6593810e1 Add script to sync CODEOWNERS with chart maintainers (#148)
* Add script to sync CODEOWNERS with chart maintainers

Signed-off-by: Torsten Walter <mail@torstenwalter.de>

* renamed script

Signed-off-by: Torsten Walter <mail@torstenwalter.de>

* Sort maintainers alphabetically

Signed-off-by: Torsten Walter <mail@torstenwalter.de>
2020-09-30 10:34:52 -04:00

21 lines
752 B
Bash
Executable File

#!/usr/bin/env bash
cat <<EOF
# See https://github.com/scottrigby/prometheus-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
EOF
for DIR in $(ls -1 -d ./charts/*)
do
FILE="$DIR/Chart.yaml"
DIR=$(echo $DIR | sed 's/^\.//')
MAINTAINERS=$(yq r $FILE 'maintainers.[*].name'| sed 's/^/@/' | sort)
echo $DIR/ $MAINTAINERS
done