Skip to content

Commit f0b9202

Browse files
🚀 [Refactor]: Enhance context parameter handling by adding wildcard support in Disconnect-GitHubAccount for improved flexibility.
1 parent b09f438 commit f0b9202

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎src/functions/public/Auth/Disconnect-GitHubAccount.ps1‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
# The context to run the command with.
4444
# Can be either a string or a GitHubContext object.
4545
[Parameter(ValueFromPipeline)]
46+
[SupportsWildcards()]
4647
[object[]] $Context
4748
)
4849

@@ -55,6 +56,9 @@
5556
if (-not $Context) {
5657
$Context = Get-GitHubContext
5758
}
59+
if ($Context.Contains('*')) {
60+
$Context = Get-GitHubContext -Name $Context
61+
}
5862
foreach ($contextItem in $Context) {
5963
$contextItem = Resolve-GitHubContext -Context $contextItem
6064

0 commit comments

Comments
 (0)