pcgeek86 / PSGitHub

This PowerShell module contains commands to manage GitHub through its REST API.
MIT License
182 stars 39 forks source link

Modify Get-GitHubRepository to return all repos for the authenticated… #41

Closed exactmike closed 6 years ago

exactmike commented 6 years ago

… user when run without parameters, to return all repos for the specified owner when run with just the owner parameter and to retain consistent behavior with the ReadMe and License parameters when an owner and repository are specified.

Thanks for submitting a Pull Request to the PSGitHub project!

Improvements / Enhancements

List out any code changes or enhancements you've made. This includes refactoring and removal of extraneous code. :)

Modified the Get-GitHubRepository Function to return all (public and private) repositories for the authenticated user when used without parameters (Current authenticated user is still specified as the default for the Owner parameter). Also will return all public repositories for a specified owner (it is not required to specify the Repository parameter). Also will still return a specific repository when both owner and repository parameters are specified and will return ReadMe or License data only when those switches are used. ParameterSets were used to retain legacy behavior and extend to the new behaviors, however, there is a change to what would happen if a user runs Get-GitHubRepository without parameters - there won't be any prompting for parameter and instead the current authenticated user's repositories would be returned. Updated Help and Examples to match the new / modified functionality.

@pcgeek86

pcgeek86 commented 6 years ago

Thanks for the contribution, @exactmike!