TIL

Adding a label to multiple Github repos

04.10.2024
for dir in */; do
if [ -d "$dir/.git" ]; then
echo "Setting $dir as default repository"
(cd "$dir" && gh repo set-default)
echo "Adding label to repository in $dir"
(cd "$dir" && gh label create "security" --color "BD55B7" --description "Security issue, will be escalated on slack every day the pull-request is open.")
else
echo "Skipping $dir as it is not a git repository"
fi
donee