Skip to content

Get-GitHubSecretSelectedRepository

SYNOPSIS

List selected repositories for an organization secret.

SYNTAX

Get-GitHubSecretSelectedRepository [-Owner] <String> [-Name] <String> [[-Context] <Object>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Lists all repositories that have been selected when the visibilityfor repository access to a secret is set to selected. Authenticated users must have collaborator access to a repository to create, update, or read secrets. OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint. If the repository is private, the repo scope is also required.

EXAMPLES

EXAMPLE 1

Get-GitHubSecretSelectedRepository -Owner 'octocat' -Name 'hello-world'

Outputs:

Name        : hello-world
NodeID      : m_MDXNcwMAwMMA
ID          : 123456789
Description : A test repo for hello-world.
Owner       : octocat
Url         : https://github.com/octocat/hello-world
CreatedAt   :
UpdatedAt   :

Name        : hello-world2
NodeID      : n_NEYOdxNBxNNB
ID          : 987654321
Description : A test repo for hello-world.
Owner       : octocat
Url         : https://github.com/octocat/hello-world2
CreatedAt   :
UpdatedAt   :

Gets the repositories that have been selected for the secret hello-world in the organization octocat.

PARAMETERS

-Owner

The account owner of the repository. The name is not case sensitive.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name

The name of the secret.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
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: 3
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

OUTPUTS

GitHubRepository

NOTES

Returns a list of GitHubRepository objects that represent the repositories that can access the secret.

https://psmodule.io/GitHub/Functions/Secrets/SelectedRepository/Get-GitHubSecretSelectedRepository

[List selected repositories for an organization secret](https://docs.github.com/rest/actions/Secrets#list-selected-repositories-for-an-organization-Secret)