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