Merge pull request #2360 from Aerovity/ci/labels-skip-existing

ci(labels): create unforced labels only when they are missing
This commit is contained in:
Dean
2026-10-10 11:39:22 +13:00
committed by GitHub
+2 -1
View File
@@ -19,7 +19,8 @@ jobs:
GH_REPO: ${{ github.repository }}
steps:
- run: |
label() { gh label create "$1" --color "$2" --description "$3"; }
existing=$(gh label list --limit 1000 --json name --jq '.[].name')
label() { grep -qixF -- "$1" <<< "$existing" || gh label create "$1" --color "$2" --description "$3"; }
force_label() { gh label create "$1" --color "$2" --description "$3" --force; }
force_label 'needs rebase' b60205 'Conflicts with main, rebase needed'