Skip to content

Not forwarding AccessToken to sub-commands for Repo Team Permissions#362

Merged
HowardWolosky merged 2 commits intomicrosoft:masterfrom
HowardWolosky:teamPermissionsAccessToken
Dec 15, 2022
Merged

Not forwarding AccessToken to sub-commands for Repo Team Permissions#362
HowardWolosky merged 2 commits intomicrosoft:masterfrom
HowardWolosky:teamPermissionsAccessToken

Conversation

@HowardWolosky
Copy link
Copy Markdown
Contributor

Description

The Get/Set/Remove-GitHubRepositoryTeamPermission functions will sometimes call Get-GitHubTeam to get missing information. In those instances, they weren't passing along the AccessToken parameter if it had been provided by the user. In those scenarios, the result will be a 404 since the Get-GitHubTeam call won't have the same auth permissions as the core API being called.

Issues Fixed

Fixes #353

Checklist

  • You actually ran the code that you just wrote, especially if you did just "one last quick change".
  • Comment-based help added/updated, including examples.
  • Static analysis is reporting back clean.
  • New/changed code adheres to our coding guidelines.
  • Formatters were created for any new types being added.
  • New/changed code continues to support the pipeline.
  • Changes to the manifest file follow the manifest guidance.
  • Unit tests were added/updated and are all passing. See testing guidelines. This includes making sure that all pipeline input variations have been covered.
  • Relevant usage examples have been added/updated in USAGE.md.
  • If desired, ensure your name is added to our Contributors list

The Get/Set/Remove-GitHubRepositoryTeamPermission functions will
sometimes call Get-GitHubTeam to get missing information.  In those
instances, they weren't passing along the `AccessToken` parameter
if it had been provided by the user.  In those scenarios, the result
will be a 404 since the Get-GitHubTeam call won't have the same auth
permissions as the core API being called.
@HowardWolosky HowardWolosky added bug This relates to a bug in the existing module. api-repositories Work to complete the API's defined here: https://developer.github.com/v3/repos/ labels Jul 26, 2022
@HowardWolosky HowardWolosky merged commit 4d7667b into microsoft:master Dec 15, 2022
@HowardWolosky HowardWolosky deleted the teamPermissionsAccessToken branch December 15, 2022 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-repositories Work to complete the API's defined here: https://developer.github.com/v3/repos/ bug This relates to a bug in the existing module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set-GitHubRepositoryTeamPermission fails on private repos

1 participant