Skip to content

Commit 943031d

Browse files
committed
Running find role assignments files script in batches
1 parent 7fb491b commit 943031d

3 files changed

Lines changed: 31 additions & 0 deletions

File tree

scripts/find-role-assignments-files.ps1

Whitespace-only changes.

scripts/process-all-batches.ps1

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Master script to process all batches and create PRs
2+
3+
$batchFiles = Get-ChildItem -Path "batch-*-files.txt" | Sort-Object Name
4+
5+
foreach ($batchFile in $batchFiles) {
6+
$batchNumber = ($batchFile.Name -split "-")[1]
7+
8+
Write-Host "Processing $($batchFile.Name)..."
9+
10+
# Create a new branch for this batch
11+
$branchName = "update-role-assignments-batch-$batchNumber"
12+
git checkout main
13+
git pull origin main
14+
git checkout -b $branchName
15+
16+
# Update files in this batch
17+
& ".\update-role-assignments-batch.ps1" -BatchFile $batchFile.Name
18+
19+
# Commit changes
20+
git add .
21+
git commit -m "Update role-assignments-portal.yml links to generic links (batch $batchNumber)"
22+
23+
# Push branch (you'll need to create PR manually or use GitHub CLI)
24+
git push origin $branchName
25+
26+
Write-Host "Completed batch $batchNumber. Branch: $branchName"
27+
Write-Host "Create PR for this batch before proceeding to the next one."
28+
29+
# Wait for user confirmation before proceeding
30+
Read-Host "Press Enter to continue to next batch or Ctrl+C to stop"
31+
}

scripts/update-role-assignments-batch.ps1

Whitespace-only changes.

0 commit comments

Comments
 (0)