From 8a6882cc56730482a20bb76f7b25c41a14fda4c6 Mon Sep 17 00:00:00 2001 From: Jens Reinemann Date: Wed, 13 May 2026 15:10:28 +0200 Subject: [PATCH] fix(gh-tickets skill): 3 Bugs in next-ticket + create-next-ticket korrigiert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit next-ticket.ps1: - --json-Flag: Leerzeichen nach Kommas entfernt ('number, title, labels' → 'number,title,labels'). gh CLI interpretierte die Felder als 3 separate Argumente → Fehler 'accepts 1 arg(s), received 3'. - gh project item-list ohne --limit ergänzt (--limit 200). Das Standard-Limit von 20 führt bei >20 Board-Items dazu, dass Tickets nicht gefunden werden. create-next-ticket.ps1: - Type-Label-Validierung war unvollständig: nur migration, tech-decision und infrastructure wurden akzeptiert. Alle 8 gültigen Typen ergänzt (block-planning, feature, refactoring, planning, test). --- .github/skills/gh-tickets/create-next-ticket.ps1 | 5 +++-- .github/skills/gh-tickets/next-ticket.ps1 | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/skills/gh-tickets/create-next-ticket.ps1 b/.github/skills/gh-tickets/create-next-ticket.ps1 index cd24ab1..df135a1 100644 --- a/.github/skills/gh-tickets/create-next-ticket.ps1 +++ b/.github/skills/gh-tickets/create-next-ticket.ps1 @@ -25,9 +25,10 @@ $orderFieldId = "PVTF_lAHOCFqiJ84BXk9UzhSw4jo" # --- 1. Type-Label validieren --- $labelList = $Labels -split ',' | ForEach-Object { $_.Trim() } -$hasType = ($labelList -contains "migration") -or ($labelList -contains "tech-decision") -or ($labelList -contains "infrastructure") +$validTypes = @("migration","tech-decision","infrastructure","block-planning","feature","refactoring","planning","test") +$hasType = ($labelList | Where-Object { $validTypes -contains $_ }).Count -gt 0 if (-not $hasType) { - Write-Error "Mindestens ein Type-Label erforderlich: migration, tech-decision, infrastructure" + Write-Error "Mindestens ein Type-Label erforderlich: $($validTypes -join ', ')" exit 1 } diff --git a/.github/skills/gh-tickets/next-ticket.ps1 b/.github/skills/gh-tickets/next-ticket.ps1 index b6aeb50..0e01a69 100644 --- a/.github/skills/gh-tickets/next-ticket.ps1 +++ b/.github/skills/gh-tickets/next-ticket.ps1 @@ -13,7 +13,7 @@ $repo = "jreinemann-euris/krisenvorrat" if ($IssueNumber -gt 0) { # Variante A: Explizite Issue-Nummer - $json = gh issue view $IssueNumber --repo $repo --json number, title, labels | ConvertFrom-Json + $json = gh issue view $IssueNumber --repo $repo --json number,title,labels | ConvertFrom-Json $labels = $json.labels | ForEach-Object { $_.name } $type = if ($labels -contains "block-planning") { "[B]" } elseif ($labels -contains "migration") { "[M]" } @@ -28,7 +28,7 @@ if ($IssueNumber -gt 0) { } else { # Variante B: Nächstes Ticket per Board-Query (client-seitig auf Todo gefiltert) - $raw = gh project item-list 2 --owner jreinemann-euris --format json | ConvertFrom-Json + $raw = gh project item-list 2 --owner jreinemann-euris --format json --limit 200 | ConvertFrom-Json if ($null -eq $raw -or $null -eq $raw.items) { Write-Host "Keine offenen Tickets gefunden." return