Skip to content

Commit

Permalink
chore: Add init-labels.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
hankei6km committed Dec 16, 2023
1 parent 90301df commit cd9e002
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions scripts/init-labels.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# set -e

LABELS_TEXT_COLOR_DESCRIPTIOM=(
"sem-pr: feat,#00bfff,Feature-related changes"
"sem-pr: fix,#d73a4a,Fixes for bugs or errors"
"sem-pr: docs,#0075ca,Documentation updates"
"sem-pr: style,#ffa500,Code style changes"
"sem-pr: refactor,#9400d3,Code refactoring"
"sem-pr: perf,#008000,Performance improvements"
"sem-pr: test,#ffff00,Test-related changes"
"sem-pr: build,#b0b0b0,Build system changes"
"sem-pr: ci,#b0b0b0,Continuous integration changes"
"sem-pr: chore,#b0b0b0,Chores and miscellaneous tasks"
"sem-pr: revert,#d73a4a,Reverts previous changes"
"sem-pr: breaking change,#e99695,This change may affect existing functionality or APIs"
"scope: prepare-commit-msg-context,#C2E0C6,prepare-commit-msg-context-related changes"
)

for label_color_description in "${LABELS_TEXT_COLOR_DESCRIPTIOM[@]}"; do
label=$(echo "${label_color_description}" | cut -d ',' -f 1)
color=$(echo "${label_color_description}" | cut -d ',' -f 2)
description=$(echo "${label_color_description}" | cut -d ',' -f 3)
echo "Creating label ${label} with color ${color} and description ${description}"
gh label create "${label}" --color "${color}" --description "${description}"
done

0 comments on commit cd9e002

Please sign in to comment.