Shuffle/scripts/forgejo-labels.sh
cschlaefke 317634dac5
Some checks are pending
CI / flutter (push) Waiting to run
CI / supabase (push) Waiting to run
CI / supabase-tests (push) Waiting to run
chore: initial project kit
2026-11-02 12:14:09 +01:00

28 lines
1.4 KiB
Bash
Executable file
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
# Legt das Label-Set für Shuffle im Forgejo-Repo an.
# Nutzung: FORGEJO_URL=https://git.example.de FORGEJO_ACCESS_TOKEN=xxx ./scripts/forgejo-labels.sh <owner> <repo>
set -euo pipefail
OWNER=${1:?owner fehlt}; REPO=${2:?repo fehlt}
API="$FORGEJO_URL/api/v1/repos/$OWNER/$REPO/labels"
label() {
curl -sS -o /dev/null -w "%{http_code} $1\n" -X POST "$API" \
-H "Authorization: token $FORGEJO_ACCESS_TOKEN" -H "Content-Type: application/json" \
-d "{\"name\":\"$1\",\"color\":\"$2\",\"description\":\"$3\"}"
}
label "type/story" "#1d76db" "Fachliche User Story"
label "type/bug" "#d73a4a" "Fehler"
label "type/tech" "#5319e7" "Technische Aufgabe"
label "type/epic" "#0e8a16" "Epic"
label "prio/must" "#b60205" "MVP – muss"
label "prio/should" "#d93f0b" "sollte"
label "prio/could" "#fbca04" "könnte"
label "size/s" "#c2e0c6" "< 1 Tag"
label "size/m" "#7bcf8c" "1–3 Tage"
label "size/l" "#2ea44f" "> 3 Tage – schneiden!"
label "needs-clarification" "#e99695" "Fachliche Frage offen"
label "status/spec-review" "#bfd4f2" "Spec wartet auf Freigabe"
label "status/in-progress" "#0052cc" "In Umsetzung"
label "status/ready-for-merge" "#0e8a16" "Review bestanden, Merge durch Chris"
echo "Fertig. Epic-Labels (epic/<name>) legt der requirements-analyst bei Bedarf an."