fix: stash issues

This commit is contained in:
Bjarke Sporring
2026-01-15 16:37:57 +01:00
parent cdd695b250
commit b0d2d43c8b
3 changed files with 283 additions and 87 deletions

View File

@@ -73,7 +73,15 @@ git checkout $mainBranch 2>$null | Out-Null
# Check for bug fix commit
$mainCommits = git log --pretty=format:"%s" $mainBranch 2>$null
if ($mainCommits -notmatch "security bug|Fix.*bug|security fix") {
$hasSecurityFix = $false
foreach ($commit in $mainCommits) {
if ($commit -match "security|Fix.*bug") {
$hasSecurityFix = $true
break
}
}
if (-not $hasSecurityFix) {
Write-Host "[FAIL] No security bug fix commit found on $mainBranch branch." -ForegroundColor Red
Write-Host "Hint: After stashing, switch to $mainBranch and commit a bug fix" -ForegroundColor Yellow
git checkout feature-login 2>$null | Out-Null
@@ -128,7 +136,7 @@ if (-not (Test-Path "login.py")) {
$loginContent = Get-Content "login.py" -Raw
# Check that login method exists and is implemented
if ($loginContent -notmatch "login\(username, password\)") {
if ($loginContent -notmatch "def login") {
Write-Host "[FAIL] login.py should have a login method." -ForegroundColor Red
Set-Location ..
exit 1