Skip to content

Commit 0a4ce89

Browse files
🚀 [Feature]: Update argument completers in completers.ps1 to support Get-GitHubAppInstallation for User, Organization, and Enterprise parameters
1 parent 7212939 commit 0a4ce89

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/completers.ps1‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Register-ArgumentCompleter -CommandName Connect-GitHubApp -ParameterName User -ScriptBlock {
1+
Register-ArgumentCompleter -CommandName Connect-GitHubApp, Get-GitHubAppInstallation -ParameterName User -ScriptBlock {
22
param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters)
33
$null = $commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters
44
$pattern = switch (Get-GitHubConfig -Name CompletionMode) { 'Contains' { "*$wordToComplete*" } default { "$wordToComplete*" } }
@@ -15,7 +15,7 @@
1515
[System.Management.Automation.CompletionResult]::new($_.Target.Name, $_.Target.Name, 'ParameterValue', $_.Target.Name)
1616
}
1717
}
18-
Register-ArgumentCompleter -CommandName Connect-GitHubApp -ParameterName Organization -ScriptBlock {
18+
Register-ArgumentCompleter -CommandName Connect-GitHubApp, Get-GitHubAppInstallation -ParameterName Organization -ScriptBlock {
1919
param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters)
2020
$null = $commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters
2121
$pattern = switch (Get-GitHubConfig -Name CompletionMode) { 'Contains' { "*$wordToComplete*" } default { "$wordToComplete*" } }
@@ -32,7 +32,7 @@ Register-ArgumentCompleter -CommandName Connect-GitHubApp -ParameterName Organiz
3232
[System.Management.Automation.CompletionResult]::new($_.Target.Name, $_.Target.Name, 'ParameterValue', $_.Target.Name)
3333
}
3434
}
35-
Register-ArgumentCompleter -CommandName Connect-GitHubApp -ParameterName Enterprise -ScriptBlock {
35+
Register-ArgumentCompleter -CommandName Connect-GitHubApp, Get-GitHubAppInstallation -ParameterName Enterprise -ScriptBlock {
3636
param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters)
3737
$null = $commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters
3838
$pattern = switch (Get-GitHubConfig -Name CompletionMode) { 'Contains' { "*$wordToComplete*" } default { "$wordToComplete*" } }

0 commit comments

Comments
 (0)