Replies: 1 comment 1 reply
-
That information is already available. It's simply the difference between the "view" of the information (how PowerShell renders a known object at the command-line) and the object itself.
Any of these will work: (Get-GitHubRepository -OwnerName microsoft -RepositoryName PowerShellForGitHub).default_branch or $repo = Get-GitHubRepository -OwnerName microsoft -RepositoryName PowerShellForGitHub
$repo.default_branch You can see all of the properties by piping it into Get-Member: Get-GitHubRepository -OwnerName microsoft -RepositoryName PowerShellForGitHub | gm |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'd like to be able to fetch the default branch for a repository. I can do this no problem with the GitHub API directly, but using Get-GitHubRepository (which I presume is the analog), the only data that gets output is the visibility flag for the repo. Is it possible to get the detailed information the GitHub API produces, particularly the default branch?
Beta Was this translation helpful? Give feedback.
All reactions