Skip to content

Commit 87d4b69

Browse files
test: clarify stale fork retry handling
Agent-Logs-Url: https://github.com/PSModule/GitHub/sessions/3cabdfbb-e30f-4f65-9bd0-4a90b49ed738 Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
1 parent 91a621d commit 87d4b69

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/Repositories.Tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ BeforeAll {
5757

5858
for ($attempt = 1; $attempt -le $maxAttempts; $attempt++) {
5959
$repo = & $CreateRepository
60-
if ($repo -and $repo.IsFork -and $repo.Name -and $repo.Name -ne $Name) {
60+
if ($repo -and $repo.IsFork -and $repo.Name -ne $Name) {
6161
Write-Host "Fork attempt $attempt/$maxAttempts returned stale repository [$($repo.FullName)]. Removing it before retrying."
6262
Remove-GitHubRepository -Owner $repo.Owner -Name $repo.Name -Confirm:$false
6363
} else {
@@ -75,7 +75,7 @@ BeforeAll {
7575
}
7676
}
7777

78-
throw "Fork repository [$Owner/$Name] was not available after $maxAttempts attempts."
78+
throw "Fork repository [$Owner/$Name] could not be resolved, or all attempts returned stale forks, after $maxAttempts attempts."
7979
}
8080
}
8181

0 commit comments

Comments
 (0)