-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in Update-GitHubRepository Archived parameter usage #134
Labels
bug
This relates to a bug in the existing module.
Comments
HowardWolosky
added a commit
to HowardWolosky/PowerShellForGitHub
that referenced
this issue
Sep 24, 2019
Due to a copy-paste error, the function was incorrectly inverting the user's choice. A separate work item will be created to track adding some additional tests to this part of the code. Fixes microsoft#134
Wow....great catch @amis92! Thanks so much for pointing that out and opening the Issue to let us know. What inspired you to do code inspection like this? |
Well I'm writing an automation script and whenever I can I check the code I depend on, but also I guess a lucky catch. :) |
smaglio81
pushed a commit
to ucsb/ucsb-sa-enterprise-powershellforgithub
that referenced
this issue
Sep 25, 2019
…icrosoft#135) Due to a copy-paste error, the function was incorrectly inverting the user's choice. A separate work item will be created to track adding some additional tests to this part of the code. Fixes microsoft#134
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Passing the
Archived
switch will result inarchived=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
The text was updated successfully, but these errors were encountered: