add codeowners

Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
This commit is contained in:
Vincenzo Scamporlino 2024-02-08 10:06:50 +01:00 committed by Vincenzo Scamporlino
parent b3c18f15f2
commit bacec142f7
2 changed files with 10 additions and 6 deletions

0
.github/CODEOWNERS vendored Normal file
View File

View File

@ -1,11 +1,15 @@
#!/bin/bash
pushd ./workspaces
printf "\033[1;34mEnter a name for the new workspace [required] \033[0m"
read -r name
npx --yes @backstage/create-app
printf "\033[1;34mWho are the codeowners (GitHub usernames) of the new workspace? [required] \033[0m"
read -r codeowners
popd
WORKSPACE_PATH="workspaces/${name}"
# customize name of the project
# make the setup correct
# skip yarn install
echo $name | npx --yes @backstage/create-app --path $WORKSPACE_PATH --skip-install
jq --arg name "$name" '.name = $name' ${WORKSPACE_PATH}/package.json > ${WORKSPACE_PATH}/package.json.tmp && mv ${WORKSPACE_PATH}/package.json.tmp ${WORKSPACE_PATH}/package.json
echo "/${WORKSPACE_PATH} ${codeowners}" >> .github/CODEOWNERS