Closed HanwhaARudolph closed 1 year ago
Thanks for the catch, @HanwhaARudolph! It looks like all three related functions have the same issue:
Get-GitHubRepositoryPermission
Set-GitHubRepositoryPermission
Remove-GitHubRepositoryPermission
I'll look at getting that fixed in the next day or so.
I'm also curious: Why do you opt to pass-in AccessToken
when using the functions as opposed to calling Set-GitHubAuthentication
once and having it handled for you. It's certainly more secure to do it with Set-GitHubAuthentication since the access token won't be stored in plaintext in either the console memory or history.
@HowardWolosky I was just testing when ran into it. I plan on using the set-githubauthentication.
Not a high priority fix but something that was inconsistent to the behavior I expected.
Issue Details
When using a private repository the Set-GitHubRepositoryTeamPermission throws an error on the collection of teams (teams are part of an org)
Steps to reproduce the issue
Verbose logs showing the problem
The remote server returned an error: (401) Unauthorized. 401 | Unauthorized Requires authentication | https://docs.github.com/rest/reference/teams#list-teams
Suggested solution to the issue
If present, the -AccessToken param should be passed in on line 3256: $team = Get-GitHubTeam -OrganizationName $OwnerName -AccessToken $AccessToken
PowerShell Version
Module Version
Running: 0.16.0 Installed: 0.16.0