From 8969925d51f36e83ff457d0dbfc47e056367f57b Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 6 Nov 2024 15:06:11 +0100 Subject: [PATCH 01/10] Update Get-GitHubAppInstallationAccessToken to take pipeline input from Get-GitHubAppInstallation --- src/functions/public/Actions/Stop-GitHubWorkflowRun.ps1 | 1 - .../public/Apps/Get-GitHubAppInstallationAccessToken.ps1 | 9 +++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/functions/public/Actions/Stop-GitHubWorkflowRun.ps1 b/src/functions/public/Actions/Stop-GitHubWorkflowRun.ps1 index ba014cc3e..0d42b6a83 100644 --- a/src/functions/public/Actions/Stop-GitHubWorkflowRun.ps1 +++ b/src/functions/public/Actions/Stop-GitHubWorkflowRun.ps1 @@ -42,5 +42,4 @@ Write-Output $_.Response } } - } diff --git a/src/functions/public/Apps/Get-GitHubAppInstallationAccessToken.ps1 b/src/functions/public/Apps/Get-GitHubAppInstallationAccessToken.ps1 index 058a26e9b..32c47bf07 100644 --- a/src/functions/public/Apps/Get-GitHubAppInstallationAccessToken.ps1 +++ b/src/functions/public/Apps/Get-GitHubAppInstallationAccessToken.ps1 @@ -1,4 +1,4 @@ -function Get-GitHubAppInstallationAccessToken { +filter Get-GitHubAppInstallationAccessToken { <# .SYNOPSIS Create an installation access token for an app @@ -39,7 +39,12 @@ param ( # The unique identifier of the installation. # Example: '12345678' - [Parameter(Mandatory)] + [Parameter( + Mandatory, + ValueFromPipeline, + ValueFromPipelineByPropertyName + )] + [Alias('ID')] [string] $InstallationID ) From 6822a517053b267367a96630f63f967d383236f3 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 6 Nov 2024 15:11:48 +0100 Subject: [PATCH 02/10] Rename function to New-* instead of Get-* aligning with the post method --- ...> New-GitHubAppInstallationAccessToken.ps1} | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) rename src/functions/public/Apps/{Get-GitHubAppInstallationAccessToken.ps1 => New-GitHubAppInstallationAccessToken.ps1} (81%) diff --git a/src/functions/public/Apps/Get-GitHubAppInstallationAccessToken.ps1 b/src/functions/public/Apps/New-GitHubAppInstallationAccessToken.ps1 similarity index 81% rename from src/functions/public/Apps/Get-GitHubAppInstallationAccessToken.ps1 rename to src/functions/public/Apps/New-GitHubAppInstallationAccessToken.ps1 index 32c47bf07..5fa32da7e 100644 --- a/src/functions/public/Apps/Get-GitHubAppInstallationAccessToken.ps1 +++ b/src/functions/public/Apps/New-GitHubAppInstallationAccessToken.ps1 @@ -1,4 +1,4 @@ -filter Get-GitHubAppInstallationAccessToken { +filter New-GitHubAppInstallationAccessToken { <# .SYNOPSIS Create an installation access token for an app @@ -28,13 +28,23 @@ to access this endpoint. .EXAMPLE - Get-GitHubAppInstallationAccessToken -InstallationID 12345678 + New-GitHubAppInstallationAccessToken -InstallationID 12345678 - Gets an installation access token for the installation with the ID `12345678`. + Creates an installation access token for the installation with the ID `12345678`. + + .EXAMPLE + Connect-GitHub -ClientID $ClientID -PrivateKey $PrivateKey -Verbose + Get-GitHubAppInstallation | New-GitHubAppInstallationAccessToken + + Gets the GitHub App installations and creates an installation access token for each installation. .NOTES [Create an installation access token for an app](https://docs.github.com/rest/apps/apps#create-an-installation-access-token-for-an-app) #> + [Diagnostics.CodeAnalysis.SuppressMessageAttribute( + 'PSUseShouldProcessForStateChangingFunctions', '', + Justification = 'No state is changed.' + )] [CmdletBinding()] param ( # The unique identifier of the installation. @@ -45,7 +55,7 @@ ValueFromPipelineByPropertyName )] [Alias('ID')] - [string] $InstallationID + [int] $InstallationID ) $inputObject = @{ From bc4d1cb6ecdeab36109515b9b5456eb979e7eb30 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 6 Nov 2024 15:26:43 +0100 Subject: [PATCH 03/10] BringYourOwnApp --- .../public/Auth/Connect-GitHubAccount.ps1 | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/functions/public/Auth/Connect-GitHubAccount.ps1 b/src/functions/public/Auth/Connect-GitHubAccount.ps1 index 58f885f37..2bc83ed2d 100644 --- a/src/functions/public/Auth/Connect-GitHubAccount.ps1 +++ b/src/functions/public/Auth/Connect-GitHubAccount.ps1 @@ -55,12 +55,12 @@ [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', 'AccessToken', Justification = 'Required for parameter set')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingWriteHost', '', Justification = 'Is the CLI part of the module.')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '', Justification = 'The tokens are recieved as clear text. Mitigating exposure by removing variables and performing garbage collection.')] - [CmdletBinding(DefaultParameterSetName = 'DeviceFlow')] + [CmdletBinding(DefaultParameterSetName = 'UAT')] param ( # Choose between authentication methods, either OAuthApp or GitHubApp. # For more info about the types of authentication visit: # [Differences between GitHub Apps and OAuth apps](https://docs.github.com/apps/oauth-apps/building-oauth-apps/differences-between-github-apps-and-oauth-apps) - [Parameter(ParameterSetName = 'DeviceFlow')] + [Parameter(ParameterSetName = 'UAT')] [ValidateSet('OAuthApp', 'GitHubApp')] [string] $Mode = 'GitHubApp', @@ -68,7 +68,7 @@ # Provide the list of scopes as space-separated values. # For more information on scopes visit: # [Scopes for OAuth apps](https://docs.github.com/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps) - [Parameter(ParameterSetName = 'DeviceFlow')] + [Parameter(ParameterSetName = 'UAT')] [string] $Scope = 'gist read:org repo workflow', # The personal access token to use for authentication. @@ -85,6 +85,7 @@ Mandatory, ParameterSetName = 'App' )] + [Parameter(ParameterSetName = 'UAT')] [string] $ClientID, # The private key for the GitHub App. @@ -137,12 +138,12 @@ $AuthType = if ($gitHubTokenPresent) { 'sPAT' } else { $PSCmdlet.ParameterSetName } Write-Verbose "AuthType: [$AuthType]" switch ($AuthType) { - 'DeviceFlow' { + 'UAT' { Write-Verbose 'Logging in using device flow...' - $clientID = $script:Auth.$Mode.ClientID + $authClientID = $ClientID ?? $script:Auth.$Mode.ClientID if ($Mode -ne (Get-GitHubConfig -Name 'DeviceFlowType' -ErrorAction SilentlyContinue)) { Write-Verbose "Using $Mode authentication..." - $tokenResponse = Invoke-GitHubDeviceFlowLogin -ClientID $clientID -Scope $Scope -HostName $HostName + $tokenResponse = Invoke-GitHubDeviceFlowLogin -ClientID $authClientID -Scope $Scope -HostName $HostName } else { $accessTokenValidity = [datetime](Get-GitHubConfig -Name 'AccessTokenExpirationDate') - (Get-Date) $accessTokenIsValid = $accessTokenValidity.Seconds -gt 0 @@ -162,7 +163,7 @@ Write-Host '⚠ ' -ForegroundColor Yellow -NoNewline Write-Host "Access token remaining validity $accessTokenValidityText. Refreshing access token..." } - $tokenResponse = Invoke-GitHubDeviceFlowLogin -ClientID $clientID -RefreshToken (Get-GitHubConfig -Name 'RefreshToken') -HostName $HostName + $tokenResponse = Invoke-GitHubDeviceFlowLogin -ClientID $authClientID -RefreshToken (Get-GitHubConfig -Name 'RefreshToken') -HostName $HostName } } else { $refreshTokenValidity = [datetime](Get-GitHubConfig -Name 'RefreshTokenExpirationDate') - (Get-Date) @@ -172,10 +173,10 @@ Write-Host '⚠ ' -ForegroundColor Yellow -NoNewline Write-Host 'Access token expired. Refreshing access token...' } - $tokenResponse = Invoke-GitHubDeviceFlowLogin -ClientID $clientID -RefreshToken (Get-GitHubConfig -Name 'RefreshToken') -HostName $HostName + $tokenResponse = Invoke-GitHubDeviceFlowLogin -ClientID $authClientID -RefreshToken (Get-GitHubConfig -Name 'RefreshToken') -HostName $HostName } else { Write-Verbose "Using $Mode authentication..." - $tokenResponse = Invoke-GitHubDeviceFlowLogin -ClientID $clientID -Scope $Scope -HostName $HostName + $tokenResponse = Invoke-GitHubDeviceFlowLogin -ClientID $authClientID -Scope $Scope -HostName $HostName } } } From e6f8a58fcb40980bb803d39a6bbf6032aad5aa5a Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 6 Nov 2024 17:01:02 +0100 Subject: [PATCH 04/10] Fix ClientID for paramset UAT --- README.md | 10 +++++++ .../private/Config/Reset-GitHubConfig.ps1 | 4 +++ .../public/Auth/Connect-GitHubAccount.ps1 | 28 +++++++++++++------ .../public/Config/Get-GitHubConfig.ps1 | 8 ++++-- 4 files changed, 38 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index bd37a056a..e05f8a73d 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,16 @@ Connect-GitHubAccount -Host 'https://msx.ghe.com' ✓ Logged in as octocat! ``` +#### Using a different GitHub App for issuing User access tokens + +Instead of using our default GitHub App, you can use a different GitHub App to issue user access tokens. +You can use the `-ClientID` parameters to specify the app you want to use. + +```powershell +Connect-GitHubAccount -Host 'https://msx.ghe.com' -ClientID 'lv123456789' +✓ Logged in as octocat! +``` + ### Command Exploration Familiarize yourself with the available cmdlets using the module's comprehensive documentation or inline help. diff --git a/src/functions/private/Config/Reset-GitHubConfig.ps1 b/src/functions/private/Config/Reset-GitHubConfig.ps1 index 9586c2137..c3e5fd84e 100644 --- a/src/functions/private/Config/Reset-GitHubConfig.ps1 +++ b/src/functions/private/Config/Reset-GitHubConfig.ps1 @@ -33,8 +33,10 @@ AccessToken = [securestring]::new() AccessTokenExpirationDate = [datetime]::MinValue AccessTokenType = '' + AuthClientID = $null AuthType = '' DeviceFlowType = '' + HostName = '' RefreshToken = [securestring]::new() RefreshTokenExpirationDate = [datetime]::MinValue Scope = '' @@ -47,8 +49,10 @@ AccessTokenType = '' ApiBaseUri = 'https://api.github.com' ApiVersion = '2022-11-28' + AuthClientID = $null AuthType = '' DeviceFlowType = '' + HostName = '' Owner = '' RefreshToken = [securestring]::new() RefreshTokenExpirationDate = [datetime]::MinValue diff --git a/src/functions/public/Auth/Connect-GitHubAccount.ps1 b/src/functions/public/Auth/Connect-GitHubAccount.ps1 index 2bc83ed2d..02e91798c 100644 --- a/src/functions/public/Auth/Connect-GitHubAccount.ps1 +++ b/src/functions/public/Auth/Connect-GitHubAccount.ps1 @@ -80,15 +80,15 @@ [Alias('PAT')] [switch] $AccessToken, - # The client ID for the GitHub App. + # The client ID for the GitHub App to use for authentication. + [Parameter(ParameterSetName = 'UAT')] [Parameter( Mandatory, ParameterSetName = 'App' )] - [Parameter(ParameterSetName = 'UAT')] [string] $ClientID, - # The private key for the GitHub App. + # The private key for the GitHub App when authenticating as a GitHub App. [Parameter( Mandatory, ParameterSetName = 'App' @@ -135,12 +135,12 @@ Write-Debug "GitHub token: [$gitHubToken]" $gitHubTokenPresent = $gitHubToken.count -gt 0 -and -not [string]::IsNullOrEmpty($gitHubToken) Write-Debug "GitHub token present: [$gitHubTokenPresent]" - $AuthType = if ($gitHubTokenPresent) { 'sPAT' } else { $PSCmdlet.ParameterSetName } + $AuthType = if ($gitHubTokenPresent) { 'IAT' } else { $PSCmdlet.ParameterSetName } Write-Verbose "AuthType: [$AuthType]" switch ($AuthType) { 'UAT' { Write-Verbose 'Logging in using device flow...' - $authClientID = $ClientID ?? $script:Auth.$Mode.ClientID + $authClientID = $ClientID ?? (Get-GitHubConfig -Name 'AuthClientID') ?? $script:Auth.$Mode.ClientID if ($Mode -ne (Get-GitHubConfig -Name 'DeviceFlowType' -ErrorAction SilentlyContinue)) { Write-Verbose "Using $Mode authentication..." $tokenResponse = Invoke-GitHubDeviceFlowLogin -ClientID $authClientID -Scope $Scope -HostName $HostName @@ -189,8 +189,10 @@ AccessTokenType = $tokenResponse.access_token -replace '_.*$', '_*' ApiBaseUri = $ApiBaseUri ApiVersion = $ApiVersion + AuthClientID = $authClientID AuthType = $AuthType DeviceFlowType = $Mode + HostName = $HostName RefreshToken = ConvertTo-SecureString -AsPlainText $tokenResponse.refresh_token RefreshTokenExpirationDate = (Get-Date).AddSeconds($tokenResponse.refresh_token_expires_in) Scope = $tokenResponse.scope @@ -202,8 +204,10 @@ AccessTokenType = $tokenResponse.access_token -replace '_.*$', '_*' ApiBaseUri = $ApiBaseUri ApiVersion = $ApiVersion + AuthClientID = $authClientID AuthType = $AuthType DeviceFlowType = $Mode + HostName = $HostName Scope = $tokenResponse.scope } } @@ -228,6 +232,7 @@ ApiBaseUri = $ApiBaseUri ApiVersion = $ApiVersion AuthType = $AuthType + HostName = $HostName } Set-GitHubConfig @settings break @@ -235,17 +240,19 @@ 'App' { Write-Verbose 'Logging in as a GitHub App...' Reset-GitHubConfig -Scope 'Auth' - $jwt = Get-GitHubAppJWT -ClientID $ClientID -PrivateKey $PrivateKey + $jwt = Get-GitHubAppJWT -ClientId $ClientID -PrivateKey $PrivateKey $settings = @{ AccessToken = ConvertTo-SecureString -AsPlainText $jwt AccessTokenType = 'JWT' ApiBaseUri = $ApiBaseUri ApiVersion = $ApiVersion AuthType = $AuthType + ClientID = $ClientID + HostName = $HostName } Set-GitHubConfig @settings } - 'sPAT' { + 'IAT' { Write-Verbose 'Logging in using GitHub access token...' Reset-GitHubConfig -Scope 'Auth' $prefix = $gitHubToken -replace '_.*$', '_*' @@ -254,7 +261,9 @@ AccessTokenType = $prefix ApiBaseUri = $ApiBaseUri ApiVersion = $ApiVersion - AuthType = 'sPAT' + AuthType = 'IAT' + ClientID = $ClientID + HostName = $HostName } Set-GitHubConfig @settings } @@ -265,7 +274,8 @@ $app = Get-GitHubApp $username = $app.slug } - 'sPAT' { + 'IAT' { + Get-GitHubApp $username = 'system' } default { diff --git a/src/functions/public/Config/Get-GitHubConfig.ps1 b/src/functions/public/Config/Get-GitHubConfig.ps1 index 00e510ac9..e619922fd 100644 --- a/src/functions/public/Config/Get-GitHubConfig.ps1 +++ b/src/functions/public/Config/Get-GitHubConfig.ps1 @@ -21,22 +21,24 @@ function Get-GitHubConfig { # Choose a configuration name to get. [Parameter()] [ValidateSet( + 'All', 'AccessToken', 'AccessTokenExpirationDate', 'AccessTokenType', 'ApiBaseUri', 'ApiVersion', + 'AuthClientID', 'AuthType', 'DeviceFlowType', + 'HostName', 'Owner', 'RefreshToken', 'RefreshTokenExpirationDate', 'Repo', + 'Scope', 'SecretVaultName', 'SecretVaultType', - 'Scope', - 'UserName', - 'All' + 'UserName' )] [string] $Name = 'All' ) From a6f558c61a8ca9f1621ab7edd59fb893c8b0b81d Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 6 Nov 2024 17:03:19 +0100 Subject: [PATCH 05/10] space --- src/functions/public/Auth/Connect-GitHubAccount.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/src/functions/public/Auth/Connect-GitHubAccount.ps1 b/src/functions/public/Auth/Connect-GitHubAccount.ps1 index 4bc7c8e1c..02e91798c 100644 --- a/src/functions/public/Auth/Connect-GitHubAccount.ps1 +++ b/src/functions/public/Auth/Connect-GitHubAccount.ps1 @@ -79,7 +79,6 @@ [Alias('Token')] [Alias('PAT')] [switch] $AccessToken, - # The client ID for the GitHub App to use for authentication. [Parameter(ParameterSetName = 'UAT')] From acae4f08277954776678ab07cfe7c2d5b4e42d8d Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 6 Nov 2024 17:07:53 +0100 Subject: [PATCH 06/10] Fix Set-GitHubConfig --- src/functions/public/Config/Set-GitHubConfig.ps1 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/functions/public/Config/Set-GitHubConfig.ps1 b/src/functions/public/Config/Set-GitHubConfig.ps1 index b8cb3e567..9bb5ff06d 100644 --- a/src/functions/public/Config/Set-GitHubConfig.ps1 +++ b/src/functions/public/Config/Set-GitHubConfig.ps1 @@ -41,6 +41,10 @@ function Set-GitHubConfig { [Parameter()] [string] $ApiVersion, + # Set the authentication client ID. + [Parameter()] + [string] $AuthClientID, + # Set the authentication type. [Parameter()] [string] $AuthType, @@ -49,6 +53,9 @@ function Set-GitHubConfig { [Parameter()] [string] $DeviceFlowType, + # Set the host name. + [string] $HostName, + # Set the default for the Owner parameter. [Parameter()] [string] $Owner, @@ -90,15 +97,17 @@ function Set-GitHubConfig { AccessTokenType = $AccessTokenType ApiBaseUri = $ApiBaseUri ApiVersion = $ApiVersion + AuthClientID = $AuthClientID AuthType = $AuthType DeviceFlowType = $DeviceFlowType + HostName = $HostName Owner = $Owner "$prefix`RefreshToken" = $RefreshToken RefreshTokenExpirationDate = $RefreshTokenExpirationDate Repo = $Repo + Scope = $Scope SecretVaultName = $SecretVaultName SecretVaultType = $SecretVaultType - Scope = $Scope UserName = $UserName } From e2fc3fdb42dcece9be41b7142375db68efbae1a7 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 6 Nov 2024 17:17:18 +0100 Subject: [PATCH 07/10] Add ClientID property --- src/functions/private/Config/Reset-GitHubConfig.ps1 | 2 ++ src/functions/public/Config/Get-GitHubConfig.ps1 | 1 + src/functions/public/Config/Set-GitHubConfig.ps1 | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/src/functions/private/Config/Reset-GitHubConfig.ps1 b/src/functions/private/Config/Reset-GitHubConfig.ps1 index c3e5fd84e..45204cb0e 100644 --- a/src/functions/private/Config/Reset-GitHubConfig.ps1 +++ b/src/functions/private/Config/Reset-GitHubConfig.ps1 @@ -35,6 +35,7 @@ AccessTokenType = '' AuthClientID = $null AuthType = '' + ClientID = '' DeviceFlowType = '' HostName = '' RefreshToken = [securestring]::new() @@ -51,6 +52,7 @@ ApiVersion = '2022-11-28' AuthClientID = $null AuthType = '' + ClientID = '' DeviceFlowType = '' HostName = '' Owner = '' diff --git a/src/functions/public/Config/Get-GitHubConfig.ps1 b/src/functions/public/Config/Get-GitHubConfig.ps1 index e619922fd..64108ac39 100644 --- a/src/functions/public/Config/Get-GitHubConfig.ps1 +++ b/src/functions/public/Config/Get-GitHubConfig.ps1 @@ -29,6 +29,7 @@ function Get-GitHubConfig { 'ApiVersion', 'AuthClientID', 'AuthType', + 'ClientID', 'DeviceFlowType', 'HostName', 'Owner', diff --git a/src/functions/public/Config/Set-GitHubConfig.ps1 b/src/functions/public/Config/Set-GitHubConfig.ps1 index 9bb5ff06d..6bde7d1f3 100644 --- a/src/functions/public/Config/Set-GitHubConfig.ps1 +++ b/src/functions/public/Config/Set-GitHubConfig.ps1 @@ -49,6 +49,9 @@ function Set-GitHubConfig { [Parameter()] [string] $AuthType, + # Set the client ID. + [string] $ClientID, + # Set the device flow type. [Parameter()] [string] $DeviceFlowType, @@ -99,6 +102,7 @@ function Set-GitHubConfig { ApiVersion = $ApiVersion AuthClientID = $AuthClientID AuthType = $AuthType + ClientID = $ClientID DeviceFlowType = $DeviceFlowType HostName = $HostName Owner = $Owner From c43668dc127ebb26be3d47556c7bf1c681c641ac Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 6 Nov 2024 17:28:51 +0100 Subject: [PATCH 08/10] Adding verbose logging on Invoke-GitHubAPI --- src/functions/public/API/Invoke-GitHubAPI.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/functions/public/API/Invoke-GitHubAPI.ps1 b/src/functions/public/API/Invoke-GitHubAPI.ps1 index eda8c93f0..761fa8532 100644 --- a/src/functions/public/API/Invoke-GitHubAPI.ps1 +++ b/src/functions/public/API/Invoke-GitHubAPI.ps1 @@ -136,6 +136,8 @@ } try { + Write-Verbose "Calling GitHub API with the following parameters:" + Write-Verbose ($APICall | ConvertFrom-HashTable | Format-List | Out-String) Invoke-RestMethod @APICall | ForEach-Object { $statusCode = $APICallStatusCode | ConvertTo-Json -Depth 100 | ConvertFrom-Json $responseHeaders = $APICallResponseHeaders | ConvertTo-Json -Depth 100 | ConvertFrom-Json From 7e2368a9a2f038a63a9d61cf9e70ae870a06e045 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 6 Nov 2024 17:39:30 +0100 Subject: [PATCH 09/10] test --- src/functions/public/Auth/Connect-GitHubAccount.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/src/functions/public/Auth/Connect-GitHubAccount.ps1 b/src/functions/public/Auth/Connect-GitHubAccount.ps1 index 02e91798c..3cbe84c88 100644 --- a/src/functions/public/Auth/Connect-GitHubAccount.ps1 +++ b/src/functions/public/Auth/Connect-GitHubAccount.ps1 @@ -275,7 +275,6 @@ $username = $app.slug } 'IAT' { - Get-GitHubApp $username = 'system' } default { From ffb32b2e7e775069d3dfa8b0de96ee313ad2f69b Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 6 Nov 2024 17:44:14 +0100 Subject: [PATCH 10/10] fix --- src/functions/public/Config/Set-GitHubConfig.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/functions/public/Config/Set-GitHubConfig.ps1 b/src/functions/public/Config/Set-GitHubConfig.ps1 index 6bde7d1f3..ae346f9eb 100644 --- a/src/functions/public/Config/Set-GitHubConfig.ps1 +++ b/src/functions/public/Config/Set-GitHubConfig.ps1 @@ -56,7 +56,7 @@ function Set-GitHubConfig { [Parameter()] [string] $DeviceFlowType, - # Set the host name. + # Set the API hostname. [string] $HostName, # Set the default for the Owner parameter.