Skip to content

Get-GitHubPermissionDefinition

SYNOPSIS

Retrieves GitHub permission definitions

SYNTAX

Get-GitHubPermissionDefinition [[-Name] <String[]>] [[-DisplayName] <String[]>] [[-Type] <String[]>]
 [[-Scope] <String[]>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Gets the list of GitHub permission definitions from the module's internal data store. This includes fine-grained permissions for repositories, organizations, and user accounts. The function supports filtering by permission type and scope to help you find specific permissions.

File path-specific permissions are excluded from this list as they are handled differently by the GitHub API (they appear under the FilePaths property in installation data rather than as named permissions).

EXAMPLES

EXAMPLE 1

Get-GitHubPermissionDefinition

Gets all permission definitions.

EXAMPLE 2

Get-GitHubPermissionDefinition -Type Fine-grained

Gets all fine-grained permission definitions.

EXAMPLE 3

Get-GitHubPermissionDefinition -Scope Repository

Gets all permission definitions that apply to repository scope.

EXAMPLE 4

Get-GitHubPermissionDefinition -Type Fine-grained -Scope Organization

Gets all fine-grained permission definitions that apply to organization scope.

EXAMPLE 5

Get-GitHubPermissionDefinition -Name contents

Gets the specific permission definition for 'contents' permission.

PARAMETERS

-Name

Filter by permission name (supports multiple values & wildcards)

Type: String[]
Parameter Sets: (All)
Aliases:

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

-DisplayName

Filter by permission display name (supports multiple values & wildcards)

Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: *
Accept pipeline input: False
Accept wildcard characters: False

-Type

Filter by permission type (supports multiple values & wildcards)

Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: *
Accept pipeline input: False
Accept wildcard characters: False

-Scope

Filter by permission scope (supports multiple values & wildcards)

Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: *
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

GitHubPermissionDefinition[]

NOTES

This function provides access to a curated list of GitHub permission definitions maintained within the module. The data includes permission names, display names, descriptions, available options, and scopes.

File path permissions are excluded from this list as they are handled differently by the GitHub API. These permissions are user-specified paths with read/write access that appear in the FilePaths property of GitHub App installation data, not as standard named permissions.

https://psmodule.io/GitHub/Functions/Permission/Get-GitHubPermissionDefinition