Skip to content

Connect-GitHubApp

SYNOPSIS

Connects to GitHub as a installation using a GitHub App.

SYNTAX

All Installations (Default)

Connect-GitHubApp [-PassThru] [-Silent] [-Default] [-Context <Object>] [<CommonParameters>]

Filtered

Connect-GitHubApp [-User <string[]>] [-Organization <string[]>] [-Enterprise <string[]>] [-PassThru]
 [-Silent] [-Default] [-Context <Object>] [<CommonParameters>]

Installation object

Connect-GitHubApp -Installation <GitHubAppInstallation[]> [-PassThru] [-Silent] [-Default]
 [-Context <Object>] [<CommonParameters>]

Installation ID

Connect-GitHubApp -ID <int[]> [-PassThru] [-Silent] [-Default] [-Context <Object>]
 [<CommonParameters>]

ALIASES

This cmdlet has the following aliases, {{Insert list of aliases}}

DESCRIPTION

Connects to GitHub using a GitHub App to generate installation access tokens and create contexts for targets.

Available target types: - User - Organization - Enterprise

EXAMPLES

EXAMPLE 1

Connect-GitHubApp

Connects to GitHub as all available targets using the logged in GitHub App.

EXAMPLE 2

Connect-GitHubApp -User 'octocat'

Connects to GitHub as the user 'octocat' using the logged in GitHub App.

EXAMPLE 3

Connect-GitHubApp -Organization 'psmodule' -Default

Connects to GitHub as the organization 'psmodule' using the logged in GitHub App and sets it as the default context.

EXAMPLE 4

Connect-GitHubApp -Enterprise 'msx'

Connects to GitHub as the enterprise 'msx' using the logged in GitHub App.

PARAMETERS

-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: System.Object
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Default

Set as the default context.

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Enterprise

The enterprise to connect to.

Type: System.String[]
DefaultValue: ''
SupportsWildcards: true
Aliases: []
ParameterSets:
- Name: Filtered
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-ID

The installation ID(s) to connect to directly. Accepts input from the pipeline by property name (e.g. objects with an ID property)

Type: System.Int32[]
DefaultValue: ''
SupportsWildcards: false
Aliases:
- InstallationID
ParameterSets:
- Name: Installation ID
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Installation

Installation objects from pipeline for parallel processing.

Type: GitHubAppInstallation[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Installation object
  Position: Named
  IsRequired: true
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Organization

The organization to connect to.

Type: System.String[]
DefaultValue: ''
SupportsWildcards: true
Aliases: []
ParameterSets:
- Name: Filtered
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-PassThru

Passes the context object to the pipeline.

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Silent

Suppresses the output of the function.

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases:
- Quiet
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-User

The user account to connect to.

Type: System.String[]
DefaultValue: ''
SupportsWildcards: true
Aliases: []
ParameterSets:
- Name: Filtered
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

GitHubAppInstallation[]

{{ Fill in the Description }}

System.Int32[]

{{ Fill in the Description }}

OUTPUTS

System.Void

{{ Fill in the Description }}

NOTES

Authenticating to the REST API