fix: stash issues
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user