Skip to content

Set-GitHubContextSetting

SYNOPSIS

Set the GitHub configuration.

SYNTAX

Set-GitHubContextSetting [[-TokenType] <String>] [[-NodeID] <String>] [[-DatabaseID] <String>]
 [[-Token] <SecureString>] [[-TokenExpirationDate] <DateTime>] [[-ApiBaseUri] <String>]
 [[-ApiVersion] <String>] [[-AuthClientID] <String>] [[-AuthType] <String>] [[-ClientID] <String>]
 [[-DeviceFlowType] <String>] [[-Owner] <String>] [[-RefreshToken] <SecureString>]
 [[-RefreshTokenExpirationDate] <DateTime>] [[-Repo] <String>] [[-Scope] <String>] [[-Context] <String>]
 [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Set the GitHub configuration. Specific scopes can be set by using the parameters.

EXAMPLES

EXAMPLE 1

Set-GitHubContextSetting -APIBaseURI 'https://api.github.com" -APIVersion '2022-11-28'

Sets the App.API scope of the GitHub configuration.

EXAMPLE 2

Set-GitHubContextSetting -Name "MyFavouriteRepo" -Value 'https://github.com/PSModule/GitHub'

Sets a item called 'MyFavouriteRepo' in the GitHub configuration.

PARAMETERS

-TokenType

Set the access token type.

Type: String
Parameter Sets: (All)
Aliases:

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

-NodeID

The Node ID of the context.

Type: String
Parameter Sets: (All)
Aliases:

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

-DatabaseID

The Database ID of the context.

Type: String
Parameter Sets: (All)
Aliases:

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

-Token

Set the access token.

Type: SecureString
Parameter Sets: (All)
Aliases:

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

-TokenExpirationDate

Set the access token expiration date.

Type: DateTime
Parameter Sets: (All)
Aliases:

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

-ApiBaseUri

Set the API Base URI.

Type: String
Parameter Sets: (All)
Aliases:

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

-ApiVersion

Set the GitHub API Version.

Type: String
Parameter Sets: (All)
Aliases:

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

-AuthClientID

Set the authentication client ID.

Type: String
Parameter Sets: (All)
Aliases:

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

-AuthType

Set the authentication type.

Type: String
Parameter Sets: (All)
Aliases:

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

-ClientID

Set the client ID.

Type: String
Parameter Sets: (All)
Aliases:

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

-DeviceFlowType

Set the device flow type.

Type: String
Parameter Sets: (All)
Aliases:

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

-Owner

Set the default for the Owner parameter.

Type: String
Parameter Sets: (All)
Aliases:

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

-RefreshToken

Set the refresh token.

Type: SecureString
Parameter Sets: (All)
Aliases:

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

-RefreshTokenExpirationDate

Set the refresh token expiration date.

Type: DateTime
Parameter Sets: (All)
Aliases:

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

-Repo

Set the default for the Repo parameter.

Type: String
Parameter Sets: (All)
Aliases:

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

-Scope

Set the scope.

Type: String
Parameter Sets: (All)
Aliases:

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

-Context

The context name to set the configuration for.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 17
Default value: (Get-GitHubConfig -Name 'DefaultContext')
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
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

NOTES