Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/functions/public/Auth/Connect-GitHubApp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
}
default {
Write-Verbose 'No target specified. Connecting to all installations.'
$selectedInstallations.AddRange((Get-GitHubAppInstallation -Context $Context))
$selectedInstallations.AddRange(@(Get-GitHubAppInstallation -Context $Context))
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regression coverage: this change fixes the single-installation case, but the current Pester suite appears to only exercise the default (no-parameter) path against whatever installations exist in the test environment, and doesn’t assert behavior when Get-GitHubAppInstallation yields exactly one object (the scenario that previously threw). Add a targeted test that forces a single-installation return (e.g., via a controlled fixture/mocking or a dedicated test app with exactly one installation) and asserts Connect-GitHubApp -PassThru does not throw and returns one context.

Copilot uses AI. Check for mistakes.
Write-Verbose "Found [$($selectedInstallations.Count)] installations."
}
}
Expand Down
Loading