Get-GitHubRepository¶
SYNOPSIS¶
Gets a specific repository or list of repositories.
SYNTAX¶
List repositories for the authenticated user (Default)¶
Get-GitHubRepository [-Visibility <String>] [-Affiliation <String[]>] [-Property <String[]>]
[-AdditionalProperty <String[]>] [-PerPage <Int32>] [-Context <Object>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
List repositories from an account¶
Get-GitHubRepository -Owner <String> [-Visibility <String>] [-Affiliation <String[]>] [-Property <String[]>]
[-AdditionalProperty <String[]>] [-PerPage <Int32>] [-Context <Object>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
Get a repository by name¶
Get-GitHubRepository -Owner <String> -Name <String> [-Property <String[]>] [-AdditionalProperty <String[]>]
[-Context <Object>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Get a repository for the authenticated user by name¶
Get-GitHubRepository -Name <String> [-Property <String[]>] [-AdditionalProperty <String[]>] [-Context <Object>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION¶
Gets a specific repository or list of repositories. If no parameters are specified, the authenticated user's repositories are returned. If a username is specified, the user's public repositories are returned. If an organization is specified, the organization's public repositories are returned. Can also be used with the name parameter to get a specific repository.
EXAMPLES¶
EXAMPLE 1¶
Get-GitHubRepository
Gets the repositories for the authenticated user.
EXAMPLE 2¶
Get-GitHubRepository -Username 'octocat'
Gets the repositories for the specified user.
EXAMPLE 3¶
Get-GitHubRepository -Organization 'github' -Name 'octocat'
Gets the specified repository.
PARAMETERS¶
-Owner¶
The account owner of the repository. The name is not case sensitive.
Type: String
Parameter Sets: List repositories from an account, Get a repository by name
Aliases: Organization, Username
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Name¶
The name of the repository without the .git extension. The name is not case sensitive.
Type: String
Parameter Sets: Get a repository by name, Get a repository for the authenticated user by name
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Visibility¶
Limit the results to repositories with a visibility level.
Type: String
Parameter Sets: List repositories for the authenticated user, List repositories from an account
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Affiliation¶
Limit the results to repositories where the user has this role.
Type: String[]
Parameter Sets: List repositories for the authenticated user, List repositories from an account
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Property¶
Properties to include in the returned object.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-AdditionalProperty¶
Additional properties to include in the returned object. Is added to the list of properties to include. This is useful for properties that are not included in the default list of properties.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PerPage¶
The number of results per page (max 100).
Type: Int32
Parameter Sets: List repositories for the authenticated user, List repositories from an account
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Context¶
The context to run the command in. Used to get the details for the API call. Can be either a string or a GitHubContext object.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: (Get-GitHubContext)
Accept pipeline input: False
Accept wildcard characters: False
-ProgressAction¶
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters¶
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS¶
GitHubOwner¶
OUTPUTS¶
GithubRepository¶
NOTES¶
RELATED LINKS¶
https://psmodule.io/GitHub/Functions/Repositories/Get-GitHubRepository/