Closed johlju closed 4 years ago
When updating a label a change at GitHub requires the name to be sent in the request.
Invoke-GitHubApi : Validation Failed See https://developer.github.com/v3/issues/labels/#update-a-label PATCH https://api.github.com/repos/DscCommunity/DscResource.Analysis/labels/bug UnprocessableEntity At C:\Users\johlju\Documents\PowerShell\Modules\PSGitHub\0.15.178\Functions\Public\Update-GitHubLabel.ps1:110 char:9 + Invoke-GitHubApi @apiCall + ~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-GitHubApi
So this:
https://github.com/pcgeek86/PSGitHub/blob/8a74429264b64a5c90e7a397b8f96f7f0734265f/Functions/Public/Update-GitHubLabel.ps1#L85-L87
Need to change to this:
if ($NewName) { $bodyProperties['name'] = $NewName } else { $bodyProperties['name'] = $Name }
Get-Module -Name PSGitHub
Wanna do a PR?
If I have time this weekend I can send in a Pr fixing this.
Fix is in PR https://github.com/pcgeek86/PSGitHub/pull/58
When updating a label a change at GitHub requires the name to be sent in the request.
So this:
https://github.com/pcgeek86/PSGitHub/blob/8a74429264b64a5c90e7a397b8f96f7f0734265f/Functions/Public/Update-GitHubLabel.ps1#L85-L87
Need to change to this:
Get-Module -Name PSGitHub
): 0.15.178