fix(gitea): select the dedicated board browser session
This commit is contained in:
@@ -4,7 +4,9 @@ param(
|
||||
[ValidateSet('Backlog','Ready','In Progress','Blocked','Code Review','Testing','Ready to Deploy','Done')]
|
||||
[string]$Column,
|
||||
[int]$BatchSize = 8,
|
||||
[int]$MaxBatches = 0
|
||||
[int]$MaxBatches = 0,
|
||||
[ValidatePattern('^[a-zA-Z0-9_-]+$')]
|
||||
[string]$Session = 'jobjakt-board'
|
||||
)
|
||||
$ErrorActionPreference = 'Stop'
|
||||
if ($BatchSize -lt 1 -or $MaxBatches -lt 0) { throw 'Invalid batch limits' }
|
||||
@@ -24,7 +26,7 @@ try {
|
||||
$data = @{ rows = @($rows[$start..$end]); apply = [bool]$Apply; explicit = [bool]$Column }
|
||||
$scriptText = $source.Replace('/*MANIFEST*/null', ($data | ConvertTo-Json -Depth 5 -Compress))
|
||||
[IO.File]::WriteAllText($temp, $scriptText)
|
||||
$result = & playwright-cli.cmd -s=jobjakt-board run-code "--filename=$temp" 2>&1
|
||||
$result = & playwright-cli.cmd "-s=$Session" run-code "--filename=$temp" 2>&1
|
||||
$status = $LASTEXITCODE
|
||||
$result | Select-String '^\{"alreadyOrVerified"|^### Error|^(locator|page|Error):?' | ForEach-Object Line
|
||||
if ($status -ne 0 -or ($result -match '^### Error')) { throw "Board batch failed at offset $start. Reload and resume." }
|
||||
|
||||
Reference in New Issue
Block a user