-
Notifications
You must be signed in to change notification settings - Fork 191
Closed
Labels
bugThis relates to a bug in the existing module.This relates to a bug in the existing module.
Description
So I'm pretty sure there's a bug in Update-GitHubRepository
cmdlet - found it by just browsing source code:
PowerShellForGitHub/GitHubRepositories.ps1
Line 613 in 013452b
if ($PSBoundParameters.ContainsKey('Archived')) { $hashBody['archived'] = (-not $Archived.ToBool()) } |
Passing the Archived
switch will result in archived=false
parameter passed to API.
Is:
$hashBody['archived'] = (-not $Archived.ToBool())
Should be:
$hashBody['archived'] = $Archived.ToBool()
This is probably a copy-paste error since all other properties use inverted style:
PowerShellForGitHub/GitHubRepositories.ps1
Lines 610 to 614 in 013452b
if ($PSBoundParameters.ContainsKey('DisallowSquashMerge')) { $hashBody['allow_squash_merge'] = (-not $DisallowSquashMerge.ToBool()) } | |
if ($PSBoundParameters.ContainsKey('DisallowMergeCommit')) { $hashBody['allow_merge_commit'] = (-not $DisallowMergeCommit.ToBool()) } | |
if ($PSBoundParameters.ContainsKey('DisallowRebaseMerge')) { $hashBody['allow_rebase_merge'] = (-not $DisallowRebaseMerge.ToBool()) } | |
if ($PSBoundParameters.ContainsKey('Archived')) { $hashBody['archived'] = (-not $Archived.ToBool()) } | |
Metadata
Metadata
Assignees
Labels
bugThis relates to a bug in the existing module.This relates to a bug in the existing module.