File size: 1,028 Bytes
a2be137 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #!/usr/bin/env bash
set -euo pipefail
if ! command -v gh >/dev/null 2>&1; then
echo "gh CLI is required to create labels." >&2
exit 1
fi
if ! gh repo view >/dev/null 2>&1; then
echo "Run this script inside a GitHub repository with gh authenticated." >&2
exit 1
fi
labels=(
"agent:read-only|0e8a16|Read-only audit or analysis work"
"agent:test-generation|5319e7|Tests for existing behavior"
"agent:small-fix|1d76db|Small scoped fix"
"agent:review|fbca04|Review or adversarial analysis"
"agent:docs|0075ca|Documentation reality sync"
"agent:decision|d93f0b|Decision record or consolidation analysis"
"agent:needs-human|b60205|Human input or approval required"
"agent:safe|0e8a16|Low-risk agent work"
"agent:risky|d93f0b|Higher-risk work requiring scrutiny"
"agent:blocked|000000|Blocked work"
)
for spec in "${labels[@]}"; do
IFS="|" read -r name color description <<<"$spec"
gh label create "$name" --color "$color" --description "$description" --force
done
echo "Agent labels are present."
|