-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcommit_changes.ps1
More file actions
61 lines (49 loc) · 2.13 KB
/
commit_changes.ps1
File metadata and controls
61 lines (49 loc) · 2.13 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env powershell
# Commit state filtering changes
$ErrorActionPreference = "Continue"
Push-Location "c:\Users\aerki\riven\trc"
try {
Write-Host ""
Write-Host "=====================================================================" -ForegroundColor Cyan
Write-Host "Committing state filtering changes" -ForegroundColor Cyan
Write-Host "=====================================================================" -ForegroundColor Cyan
Write-Host ""
# Stage all changes
Write-Host "[1/3] Staging changes..." -ForegroundColor Yellow
& git add -A 2>&1 | Out-Null
Write-Host " ✓ Staged" -ForegroundColor Green
Write-Host ""
# Create commit
Write-Host "[2/3] Creating commit..." -ForegroundColor Yellow
$message = @"
Enforce state filtering: only process Failed/Unknown items
- Enhanced get_problem_items() fallback to filter locally by state
- Added state re-validation in _handle_problem_item()
- Items with changed states automatically removed from tracking
- Added STATE_FILTERING.md documentation
- Created verify_states.py verification script
This ensures TRC only processes items in Failed or Unknown states from Riven,
with multiple layers of filtering and validation.
"@
& git commit -m $message 2>&1 | Tee-Object -Variable commitOutput | Out-Null
if ($LASTEXITCODE -eq 0) {
Write-Host " ✓ Commit created" -ForegroundColor Green
} else {
Write-Host " ✗ Commit failed" -ForegroundColor Red
Write-Host "$commitOutput"
}
Write-Host ""
# Show commit info
Write-Host "[3/3] Commit details:" -ForegroundColor Yellow
& git log --oneline -1 2>&1
Write-Host ""
Write-Host "=====================================================================" -ForegroundColor Cyan
Write-Host "✓ COMMIT COMPLETE" -ForegroundColor Green
Write-Host "=====================================================================" -ForegroundColor Cyan
Write-Host ""
Write-Host "Next: git push origin main" -ForegroundColor Gray
} catch {
Write-Host "Error: $_" -ForegroundColor Red
} finally {
Pop-Location
}