|
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +# set -e |
| 4 | + |
| 5 | +LABELS_TEXT_COLOR_DESCRIPTIOM=( |
| 6 | + "sem-pr: feat,#00bfff,Feature-related changes" |
| 7 | + "sem-pr: fix,#d73a4a,Fixes for bugs or errors" |
| 8 | + "sem-pr: docs,#0075ca,Documentation updates" |
| 9 | + "sem-pr: style,#ffa500,Code style changes" |
| 10 | + "sem-pr: refactor,#9400d3,Code refactoring" |
| 11 | + "sem-pr: perf,#008000,Performance improvements" |
| 12 | + "sem-pr: test,#ffff00,Test-related changes" |
| 13 | + "sem-pr: build,#b0b0b0,Build system changes" |
| 14 | + "sem-pr: ci,#b0b0b0,Continuous integration changes" |
| 15 | + "sem-pr: chore,#b0b0b0,Chores and miscellaneous tasks" |
| 16 | + "sem-pr: revert,#d73a4a,Reverts previous changes" |
| 17 | + "sem-pr: breaking change,#e99695,This change may affect existing functionality or APIs" |
| 18 | + "scope: prepare-commit-msg-context,#C2E0C6,prepare-commit-msg-context-related changes" |
| 19 | +) |
| 20 | + |
| 21 | +for label_color_description in "${LABELS_TEXT_COLOR_DESCRIPTIOM[@]}"; do |
| 22 | + label=$(echo "${label_color_description}" | cut -d ',' -f 1) |
| 23 | + color=$(echo "${label_color_description}" | cut -d ',' -f 2) |
| 24 | + description=$(echo "${label_color_description}" | cut -d ',' -f 3) |
| 25 | + echo "Creating label ${label} with color ${color} and description ${description}" |
| 26 | + gh label create "${label}" --color "${color}" --description "${description}" |
| 27 | +done |
0 commit comments