Script using https://github.com/clok/ghlabels to apply preferred labels to new repos, or update existing ones.
Usage:
./labels.sh -c labelcfg.yaml \
-r <org>/<name> \
-r <user/name>
Script using https://github.com/clok/ghlabels to apply preferred labels to new repos, or update existing ones.
Usage:
./labels.sh -c labelcfg.yaml \
-r <org>/<name> \
-r <user/name>
--- | |
rename: [] | |
remove: | |
- documentation | |
- enhancement | |
- invalid | |
- bug | |
sync: | |
- name: kind/documentation | |
color: 838AB0 | |
description: "Documentation only" | |
- name: kind/improvement | |
color: DDE312 | |
description: "Superficial improvement, not a feature or a bug" | |
- name: wontfix | |
color: ffffff | |
description: This will not be worked on | |
- name: help wanted | |
color: "008672" | |
description: Requires help from contributors to get done | |
- name: kind/cleanup | |
color: 39A2D2 | |
description: "Removing things previously overlooked" | |
- name: kind/dependencies | |
color: 5640CE | |
description: Change/request only involves dependencies | |
- name: kind/refactor | |
color: D056E1 | |
description: "Only refactoring changes" | |
- name: kind/test | |
color: "046569" | |
description: "Updates to tests only" | |
- name: question | |
color: C8E095 | |
description: Further information is requested | |
- name: good first issue | |
color: 7057ff | |
description: Good for newcomers | |
- name: kind/bug | |
color: B60205 | |
description: "Something isn't working" | |
- name: kind/feature | |
color: 1BF534 | |
description: "New feature or request" | |
- name: kind/regression | |
color: 7F043D | |
description: "Regression has been spotted/introduced" | |
- name: duplicate | |
color: cfd3d7 | |
description: This issue or pull request already exists | |
- name: kind/chore | |
color: 8C7D77 | |
description: "Neither feature nor bug nor improvement. Busy work" |
#!/bin/bash | |
if [ -z "$GITHUB_TOKEN" ]; then | |
echo "usage: GITHUB_TOKEN must be exported. PAT with repo scope." | |
exit 1 | |
fi | |
curl https://i.jpillora.com/clok/ghlabels! | bash | |
repos=() | |
config="" | |
while [ $# -gt 0 ]; do | |
case "$1" in | |
-c | --config) | |
shift | |
config="$1" | |
;; | |
-r | --repo) | |
shift | |
repos+=("$1") | |
;; | |
-*) | |
echo "Unknown arg: $1." | |
exit 1 | |
;; | |
*) | |
break | |
;; | |
esac | |
shift | |
done | |
for repo in "${repos[@]}"; do | |
ghlabels sync repo -c "$config" -r "$repo" | |
done |