-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfix-milestones.ps1
More file actions
41 lines (35 loc) · 1.54 KB
/
fix-milestones.ps1
File metadata and controls
41 lines (35 loc) · 1.54 KB
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
35
36
37
38
39
40
41
#!/usr/bin/env pwsh
# fix-milestones.ps1 — Delete and recreate all phase milestones correctly
$repos = @(
"it-stack-docs"
"it-stack-installer"
"it-stack-testing"
"it-stack-ansible"
"it-stack-terraform"
"it-stack-helm"
)
$milestones = @(
@{ Title = "Phase 1: Foundation"; Due = "2026-03-27T00:00:00Z"; Desc = "FreeIPA, Keycloak, PostgreSQL, Redis, Traefik" }
@{ Title = "Phase 2: Collaboration"; Due = "2026-04-24T00:00:00Z"; Desc = "Nextcloud, Mattermost, Jitsi, iRedMail, Zammad" }
@{ Title = "Phase 3: Back Office"; Due = "2026-06-05T00:00:00Z"; Desc = "FreePBX, SuiteCRM, Odoo, OpenKM" }
@{ Title = "Phase 4: IT Management"; Due = "2026-07-17T00:00:00Z"; Desc = "Taiga, Snipe-IT, GLPI, Elasticsearch, Zabbix, Graylog" }
)
foreach ($repo in $repos) {
Write-Host "Fixing milestones in $repo ..." -ForegroundColor Cyan
# Delete all existing milestones
$existing = gh api "repos/it-stack-dev/$repo/milestones?state=all&per_page=20" | ConvertFrom-Json
foreach ($ms in $existing) {
gh api -X DELETE "repos/it-stack-dev/$repo/milestones/$($ms.number)" | Out-Null
Write-Host " Deleted: $($ms.title)"
}
# Create the correct milestones
foreach ($ms in $milestones) {
gh api -X POST "repos/it-stack-dev/$repo/milestones" `
-f title=$ms.Title `
-f due_on=$ms.Due `
-f description=$ms.Desc | Out-Null
Write-Host " Created: $($ms.Title)" -ForegroundColor Green
}
}
Write-Host ""
Write-Host "All milestones fixed." -ForegroundColor Yellow