Closed
Description
Issue Details
When calling the New-GitHubRepository
function and passing the TeamId
parameter, the following exception is returned:
MethodException: C:\Program Files\PowerShell\Modules\PowerShellForGitHub\0.13.1\GitHubRepositories.ps1:142:9
Line |
142 | if ($PSBoundParameters.ContainsKey('TeamId') -and (-not $PSBoundP …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot find an overload for "Contains" and the argument count: "1".
Code to reproduce the issue
New-GitHubRepository -RepositoryName $RepoName -OrganizationName $OrgName -TeamId $TeamId
Suggested Solution
On line 142 of GitHubRepositories.ps1
, change the $PSBoundParameters.Contains('OrganizationName')
to $PSBoundParameters.ContainsKey('OrganizationName')
.
Operating System
OsName : Microsoft Windows Server 2019 Standard
OsOperatingSystemSKU : StandardServerEdition
OsArchitecture : 64-bit
WindowsVersion : 1809
WindowsBuildLabEx : 17763.1.amd64fre.rs5_release.180914-1434
OsLanguage : en-US
OsMuiLanguages : {en-US}
PowerShell Version
PSVersion 7.0.1
PSEdition Core
GitCommitId 7.0.1
OS Microsoft Windows 10.0.17763
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Module Version
ModuleType Version PreRelease Name
---------- ------- ---------- ----
Script 0.13.1 PowerShellForGitHub