diff --git a/src/classes/public/Config/GitHubConfig.ps1 b/src/classes/public/Config/GitHubConfig.ps1 index 02fdd1eb5..b297248ac 100644 --- a/src/classes/public/Config/GitHubConfig.ps1 +++ b/src/classes/public/Config/GitHubConfig.ps1 @@ -23,6 +23,9 @@ # The default value for the HTTP protocol version. [string] $HttpVersion + # The name of the global variable to store a collection of API Responses with Headers and StatusCode + [string] $HttpResponsesVariable + # The default value for the 'per_page' API parameter used in 'Get' functions that support paging. [int] $PerPage diff --git a/src/functions/private/Users/Get-GitHubAllUser.ps1 b/src/functions/private/Users/Get-GitHubAllUser.ps1 deleted file mode 100644 index 1a6d095e3..000000000 --- a/src/functions/private/Users/Get-GitHubAllUser.ps1 +++ /dev/null @@ -1,71 +0,0 @@ -filter Get-GitHubAllUser { - <# - .SYNOPSIS - List users - - .DESCRIPTION - Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. - - Note: Pagination is powered exclusively by the `since` parameter. Use the - [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) - to get the URL for the next page of users. - - .EXAMPLE - Get-GitHubAllUser -Since 17722253 - - Get a list of users, starting with the user 'MariusStorhaug'. - - .NOTES - https://docs.github.com/rest/users/users#list-users - #> - [OutputType([pscustomobject])] - [CmdletBinding()] - param( - # A user ID. Only return users with an ID greater than this ID. - [Parameter()] - [int] $Since = 0, - - # The number of results per page (max 100). - [Parameter()] - [ValidateRange(0, 100)] - [int] $PerPage, - - # 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. - [Parameter()] - [object] $Context = (Get-GitHubContext) - ) - - begin { - $stackPath = Get-PSCallStackPath - Write-Debug "[$stackPath] - Start" - $Context = Resolve-GitHubContext -Context $Context - Assert-GitHubContext -Context $Context -AuthType IAT, PAT, UAT - } - - process { - try { - $body = @{ - since = $Since - per_page = $PerPage - } - - $inputObject = @{ - Context = $Context - APIEndpoint = '/users' - Method = 'GET' - Body = $body - } - - Invoke-GitHubAPI @inputObject | ForEach-Object { - Write-Output $_.Response - } - } catch { - throw $_ - } - } - - end { - Write-Debug "[$stackPath] - End" - } -} diff --git a/src/functions/private/Users/Get-GitHubMyUser.ps1 b/src/functions/private/Users/Get-GitHubMyUser.ps1 deleted file mode 100644 index b58ad6ed7..000000000 --- a/src/functions/private/Users/Get-GitHubMyUser.ps1 +++ /dev/null @@ -1,55 +0,0 @@ -filter Get-GitHubMyUser { - <# - .SYNOPSIS - Get the authenticated user - - .DESCRIPTION - If the authenticated user is authenticated with an OAuth token with the `user` scope, then the response lists public - and private profile information. - If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public - profile information. - - .EXAMPLE - Get-GitHubMyUser - - Get the authenticated user - - .NOTES - https://docs.github.com/rest/users/users#get-the-authenticated-user - #> - [OutputType([pscustomobject])] - [CmdletBinding()] - param( - # 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. - [Parameter()] - [object] $Context = (Get-GitHubContext) - ) - - begin { - $stackPath = Get-PSCallStackPath - Write-Debug "[$stackPath] - Start" - $Context = Resolve-GitHubContext -Context $Context - Assert-GitHubContext -Context $Context -AuthType IAT, PAT, UAT - } - - process { - try { - $inputObject = @{ - Context = $Context - APIEndpoint = '/user' - Method = 'GET' - } - - Invoke-GitHubAPI @inputObject | ForEach-Object { - Write-Output $_.Response - } - } catch { - throw $_ - } - } - - end { - Write-Debug "[$stackPath] - End" - } -} diff --git a/src/functions/private/Users/Get-GitHubUserByName.ps1 b/src/functions/private/Users/Get-GitHubUserByName.ps1 deleted file mode 100644 index be4c82bd1..000000000 --- a/src/functions/private/Users/Get-GitHubUserByName.ps1 +++ /dev/null @@ -1,73 +0,0 @@ -filter Get-GitHubUserByName { - <# - .SYNOPSIS - Get a user - - .DESCRIPTION - Provides publicly available information about someone with a GitHub account. - GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub plan. - The GitHub App must be authenticated as a user. See - "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" - for details about authentication. For an example response, see 'Response with GitHub plan information' below" - The `email` key in the following response is the publicly visible email address from your GitHub - [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email - address to be ΓÇ£publicΓÇ¥ which provides an email entry for this endpoint. If you do not set a public email address for `email`, - then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. - For more information, see [Authentication](https://docs.github.com/rest/overview/resources-in-the-rest-api#authentication). - The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. - For more information, see "[Emails API](https://docs.github.com/rest/users/emails)". - - .EXAMPLE - Get-GitHubUserByName -Username 'octocat' - - Get the 'octocat' user. - - .NOTES - https://docs.github.com/rest/users/users#get-a-user - #> - [OutputType([pscustomobject])] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidLongLines', '', Justification = 'Contains a long link.')] - [CmdletBinding()] - param( - # The handle for the GitHub user account. - [Parameter( - Mandatory, - ValueFromPipeline, - ValueFromPipelineByPropertyName - )] - [Alias('login')] - [string] $Username, - - # 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. - [Parameter()] - [object] $Context = (Get-GitHubContext) - ) - - begin { - $stackPath = Get-PSCallStackPath - Write-Debug "[$stackPath] - Start" - $Context = Resolve-GitHubContext -Context $Context - Assert-GitHubContext -Context $Context -AuthType IAT, PAT, UAT - } - - process { - try { - $inputObject = @{ - Context = $Context - APIEndpoint = "/users/$Username" - Method = 'GET' - } - - Invoke-GitHubAPI @inputObject | ForEach-Object { - Write-Output $_.Response - } - } catch { - throw $_ - } - } - - end { - Write-Debug "[$stackPath] - End" - } -} diff --git a/src/functions/private/Users/Social-Accounts/Get-GitHubUserSocialsByName.ps1 b/src/functions/private/Users/Social-Accounts/Get-GitHubUserSocialsByName.ps1 deleted file mode 100644 index 4cff51bdf..000000000 --- a/src/functions/private/Users/Social-Accounts/Get-GitHubUserSocialsByName.ps1 +++ /dev/null @@ -1,61 +0,0 @@ -filter Get-GitHubUserSocialsByName { - <# - .SYNOPSIS - List social accounts for a user - - .DESCRIPTION - Lists social media accounts for a user. This endpoint is accessible by anyone. - - .EXAMPLE - Get-GitHubUserSocialsByName -Username 'octocat' - - Lists social media accounts for the user 'octocat'. - - .NOTES - https://docs.github.com/rest/users/social-accounts#list-social-accounts-for-a-user - #> - [OutputType([pscustomobject])] - [CmdletBinding()] - param( - # The handle for the GitHub user account. - [Parameter( - Mandatory, - ValueFromPipeline, - ValueFromPipelineByPropertyName - )] - [Alias('login')] - [string] $Username, - - # 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. - [Parameter()] - [object] $Context = (Get-GitHubContext) - ) - - begin { - $stackPath = Get-PSCallStackPath - Write-Debug "[$stackPath] - Start" - $Context = Resolve-GitHubContext -Context $Context - Assert-GitHubContext -Context $Context -AuthType IAT, PAT, UAT - } - - process { - try { - $inputObject = @{ - Context = $Context - APIEndpoint = "/users/$Username/social_accounts" - Method = 'GET' - } - - Invoke-GitHubAPI @inputObject | ForEach-Object { - Write-Output $_.Response - } - } catch { - throw $_ - } - } - - end { - Write-Debug "[$stackPath] - End" - } -} diff --git a/src/functions/public/API/Invoke-GitHubRestMethod.ps1 b/src/functions/public/API/Invoke-GitHubRestMethod.ps1 new file mode 100644 index 000000000..de1c16a74 --- /dev/null +++ b/src/functions/public/API/Invoke-GitHubRestMethod.ps1 @@ -0,0 +1,267 @@ +function Invoke-GitHubRestMethod { + <# + .SYNOPSIS + Executes request against GitHub API. + + .DESCRIPTION + Private function to call GitHub API. + + .PARAMETER Uri + A valid Uri + + .PARAMETER Body + Body used for DELETE, PATCH, POST or PUT methods + + .PARAMETER ContentType + Specifies the content type of the web request + + .PARAMETER Headers + Specifies the headers of the web request. Enter a hash table or dictionary. + + .PARAMETER ExpandProperty + If specified and the property exists in the web response, this property will be expanded priot to output. + + .PARAMETER MaximumRetryCount + Specifies how many times PowerShell retries a connection when a failure code between 400 and 599, inclusive or 304 is received. Also see RetryIntervalSec parameter for specifying number of retries. + + .PARAMETER Method + HTTP Method + + .PARAMETER OutFile + Saves the response body in the specified output file. Enter a path and file name. If you omit the path, the default is the current location. The name is treated as a literal path. Names that contain brackets (`[]`) must be enclosed in single quotes (`'`). + + .PARAMETER QueryParameters + An IDictionary of query string parameters to add to the Uri via ConvertTo-WebQueryString. + + .PARAMETER RetryIntervalSec + Specifies the interval between retries for the connection when a failure code between 400 and 599, inclusive or 304 is received. Also see MaximumRetryCount parameter for specifying number of retries. The value must be between `1` and `[int]::MaxValue`. + + .PARAMETER Token + A valid GitHub personal access token. + + .EXAMPLE + Invoke-GitHubRestMethod -Uri '' + + .LINK + https://one.mkapps.com/Help/Invoke-GitHubRestMethod.html + + .LINK + https://docs.github.com/en/rest/guides/using-pagination-in-the-rest-api?apiVersion=2022-11-28#using-link-headers + #> + [CmdletBinding(SupportsPaging)] + param( + # The HTTP method to be used for the API request. It can be one of the following: GET, POST, PUT, DELETE, or PATCH. + [Parameter()] + [Microsoft.PowerShell.Commands.WebRequestMethod] $Method = 'GET', + + # The base URI for the GitHub API. This is usually `https://api.github.com`, but can be adjusted if necessary. + [Parameter( + ParameterSetName = 'ApiEndpoint' + )] + [string] $ApiBaseUri, + + # The specific endpoint for the API call, e.g., '/repos/user/repo/pulls'. + [Parameter( + Mandatory, + ParameterSetName = 'ApiEndpoint' + )] + [string] $ApiEndpoint, + + [string]$ExpandProperty, + + $Body, + [string]$ContentType = 'application/vnd.github+json', + $Headers = @{}, + + # Specifies the HTTP version used for the request. + [Parameter()] + [string] $HttpVersion, + + [int]$MaximumRetryCount, + [Alias('UploadFilePath')] + [string]$InFile, + [Alias('DownloadFilePath')] + [string]$OutFile, + + # The full URI for the API request. This is used for custom API calls. + [Parameter( + Mandatory, + ParameterSetName = 'Uri' + )] + [string] $URI, + + [Collections.IDictionary] + $QueryParameters = @{}, + [int]$RetryIntervalSec, + + # The GitHub API version to be used. By default, it pulls from a configuration script variable. + [Parameter()] + [string] $ApiVersion, + + # 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. + [Parameter()] + [object] $Context = (Get-GitHubContext) + ) + begin { + $stackPath = Get-PSCallStackPath + Write-Debug "[$stackPath] - Start" + $Context = Resolve-GitHubContext -Context $Context + Write-Debug 'Invoking GitHub API...' + Write-Debug 'Parameters:' + Get-FunctionParameter | Format-List | Out-String -Stream | ForEach-Object { Write-Debug $_ } + Write-Debug 'Parent function parameters:' + Get-FunctionParameter -Scope 1 | Format-List | Out-String -Stream | ForEach-Object { Write-Debug $_ } + } + + process { + $Token = $Context.Token + Write-Debug "Token : [$Token]" + + if ([string]::IsNullOrEmpty($HttpVersion)) { + $HttpVersion = $Context.HttpVersion + } + Write-Debug "HttpVersion: [$HttpVersion]" + + if ([string]::IsNullOrEmpty($ApiBaseUri)) { + $ApiBaseUri = $Context.ApiBaseUri + } + Write-Debug "ApiBaseUri: [$ApiBaseUri]" + + if ([string]::IsNullOrEmpty($ApiVersion)) { + $ApiVersion = $Context.ApiVersion + } + Write-Debug "ApiVersion: [$ApiVersion]" + + if ([string]::IsNullOrEmpty($TokenType)) { + $TokenType = $Context.TokenType + } + Write-Debug "TokenType : [$TokenType]" + + switch ($TokenType) { + 'ghu' { + if (Test-GitHubAccessTokenRefreshRequired -Context $Context) { + $Token = Update-GitHubUserAccessToken -Context $Context -PassThru + } + } + 'PEM' { + $JWT = Get-GitHubAppJSONWebToken -ClientId $Context.ClientID -PrivateKey $Token + $Token = $JWT.Token + } + } + if (-not $headers.Contains('Accept')) { + $headers['Accept'] = 'application/vnd.github+json; charset=utf-8' + } + if (-not $headers.Contains('X-GitHub-Api-Version')) { + $headers['X-GitHub-Api-Version'] = $ApiVersion + } + if (-not $URI) { + $URI = ("$ApiBaseUri" -replace '/$'), ("$ApiEndpoint" -replace '^/') -join '/' + } + + # SupportsPaging related settings + if (-not $QueryParameters.Contains('per_page') -or $QueryParameters['per_page'] -lt 1 -or $QueryParameters['per_page'] -gt 100) { + $QueryParameters['per_page'] = [Math]::Max($Context.PerPage, 100) # Valid range is 1-100 + } + $_page = [int]($PSCmdlet.PagingParameters.Skip / $QueryParameters['per_page']) + 1 + $_index = ($_page - 1) * $QueryParameters['per_page'] # The number skipped by skipping page-1 pages + $_max = $PSCmdlet.PagingParameters.Skip + $PSCmdlet.PagingParameters.First + + $irmParams = @{ + Authentication = 'Bearer' + ContentType = $ContentType + Headers = $Headers + Method = $Method + HttpVersion = [string]$HttpVersion + ResponseHeadersVariable = 'ResponseHeaders' + SkipCertificateCheck = $true + StatusCodeVariable = 'StatusCode' + Token = $Token + Uri = Join-WebUriAndQueryParameters -Uri $Uri -QueryParameters $QueryParameters + Verbose = $false + } + foreach ($name in 'MaximumRetryCount', 'RetryIntervalSec') { + if ($PSBoundParameters.ContainsKey($name)) { + $irmParams[$name] = $PSBoundParameters[$name] + } + } + if (-not [string]::IsNullOrWhitespace($InFile)) { + $irmParams['InFile'] = $InFile + } + if (-not [string]::IsNullOrWhitespace($OutFile)) { + $irmParams['OutFile'] = $OutFile + } + if ($Body) { + # Use body to create the query string for certain situations + if ($Method -eq 'GET') { + # If body conatins 'per_page' and its is null, set it to $context.PerPage + if ($Body['per_page'] -gt 0 -and $Body['per_page'] -le 100) { + Write-Debug "Setting per_page to the default value in context [$($Context.PerPage)]." + $QueryParameters['per_page'] = $Body['per_page'] + } + } elseif ($Body -is [string]) { + # Use body to create the form data + $irmParams.Body = $Body + } else { + $irmParams.Body = $Body | ConvertTo-Json -Depth 100 + } + } + Write-Debug '----------------------------------' + Write-Debug 'Request:' + $irmParams | ConvertFrom-HashTable | Format-List | Out-String -Stream | ForEach-Object { Write-Debug $_ } + Write-Debug '----------------------------------' + do { + try { + $result = Invoke-RestMethod @irmParams + (Get-Variable -Name $script:GitHub.Config.HttpResponsesVariable -Scope Global).Value.Add( + [PSCustomObject]@{ + Content = $result + Date = [datetime]::Now + Headers = $ResponseHeaders + StatusCode = $StatusCode + Uri = $URI + } + ) + # 200 = OK, 201 = Created, 202 = Accepted, 204 = No Content + if (200, 201, 202, 204 -contains $StatusCode) { + if ($result) { + # Use x-ms-continuationtoken Response Header to retrieve multiple pages iff we haven't received the max results yet + $irmParams.Uri = ($ResponseHeaders['Link'] -match 'rel="next"' -and (($_index + $result.Count) -lt $_max)) ? + ([Regex]::Match($ResponseHeaders['Link'] , '<(?[^>]*)>; rel="next"').Groups['next'].Value) : + $null + if (-not [string]::IsNullOrWhiteSpace($ExpandProperty) -and $ExpandProperty -in $result.PSObject.Properties.Name) { + $result = $result | Select-Object -ExpandProperty $ExpandProperty + } + $result | + ForEach-Object { + $_index++ + # SupportsPaging enforcement + if ($_index -gt $PSCmdlet.PagingParameters.Skip -and $_index -le $_max) { + $_ + } + } + } + else { + $irmParams.Uri = $null + } + } + else { + Write-Error "[HTTP $($StatusCode)] $($result)" + } + } + catch { + $irmParams.Uri = $null + if (304 -eq $_.Exception.Response.StatusCode.value__) { + # 304 = Not Modified + } + else { + throw + } + } + } while ($null -ne $irmParams.Uri) + } + + end { + Write-Debug "[$stackPath] - End" + } +} diff --git a/src/functions/public/Auth/Connect-GitHubAccount.ps1 b/src/functions/public/Auth/Connect-GitHubAccount.ps1 index 92ca09f6f..54247d01c 100644 --- a/src/functions/public/Auth/Connect-GitHubAccount.ps1 +++ b/src/functions/public/Auth/Connect-GitHubAccount.ps1 @@ -151,6 +151,11 @@ $stackPath = Get-PSCallStackPath Write-Debug "[$stackPath] - Start" Initialize-GitHubConfig + # Maybe this should move to it's own Initialize-GlobalVariable function (or similar); open to suggestions + # Intent is to allow end users to configure the global variable name + if (-not (Get-Variable -Name $script:GitHub.Config.HttpResponsesVariable -Scope Global -ErrorAction SilentlyContinue)) { + Set-Variable -Name $script:GitHub.Config.HttpResponsesVariable -Value ([System.Collections.Generic.List[object]]::new()) -Scope Global + } } process { diff --git a/src/functions/public/Users/Get-GitHubUser.ps1 b/src/functions/public/Users/Get-GitHubUser.ps1 index 0744f87e4..97c86433b 100644 --- a/src/functions/public/Users/Get-GitHubUser.ps1 +++ b/src/functions/public/Users/Get-GitHubUser.ps1 @@ -27,12 +27,7 @@ [Get the authenticated user](https://docs.github.com/rest/users/users) #> [OutputType([pscustomobject])] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute( - 'PSReviewUnusedParameter', - 'All', - Justification = 'Parameter is used in dynamic parameter validation.' - )] - [CmdletBinding(DefaultParameterSetName = '__AllParameterSets')] + [CmdletBinding(DefaultParameterSetName = 'AuthenticatedUser', SupportsPaging)] param( # The handle for the GitHub user account. [Parameter( @@ -72,26 +67,43 @@ } process { - try { - switch ($PSCmdlet.ParameterSetName) { - '__AllParameterSets' { - $user = Get-GitHubMyUser -Context $Context - $social_accounts = Get-GitHubMyUserSocials -Context $Context - $user | Add-Member -MemberType NoteProperty -Name 'social_accounts' -Value $social_accounts -Force - $user + $irmParams = @{ + APIEndpoint = switch ($PSCmdlet.ParameterSetName) { + 'AuthenticatedUser' { + '/user' } 'NamedUser' { - $user = Get-GitHubUserByName -Username $Username -Context $Context - $social_accounts = Get-GitHubUserSocialsByName -Username $Username -Context $Context - $user | Add-Member -MemberType NoteProperty -Name 'social_accounts' -Value $social_accounts -Force - $user + "/users/$Username" } 'AllUsers' { - Get-GitHubAllUser -Since $Since -PerPage $PerPage -Context $Context + '/users' } } - } catch { - throw $_ + Context = $Context + Method = 'GET' + } + if ($PScmdlet.ParameterSetName -eq 'AllUsers') { + $irmParams['QueryParameters'] = @{ + since = $Since + per_page = $PerPage + } + foreach ($_name in 'First', 'Skip') { + if ($PSBoundParameters.ContainsKey($_name)) { + $irmParams[$_name] = $_name + } + } + Invoke-GitHubRestMethod @irmParams + } + else { + $user = Invoke-GitHubRestMethod @irmParams + $getSocialParams = @{ + Context = $Context + } + if (-not [string]::IsNullOrWhiteSpace($Username)) { + $getSocialParams['Username'] = $Username + } + $social_accounts = Get-GitHubUserSocialAccount @getSocialParams + $user | Add-Member -MemberType NoteProperty -Name 'social_accounts' -Value $social_accounts -Force -PassThru } } diff --git a/src/functions/private/Users/Social-Accounts/Get-GitHubMyUserSocials.ps1 b/src/functions/public/Users/Social-Accounts/Get-GitHubSocialAccount.ps1 similarity index 55% rename from src/functions/private/Users/Social-Accounts/Get-GitHubMyUserSocials.ps1 rename to src/functions/public/Users/Social-Accounts/Get-GitHubSocialAccount.ps1 index f9ff21027..5f73c7e34 100644 --- a/src/functions/private/Users/Social-Accounts/Get-GitHubMyUserSocials.ps1 +++ b/src/functions/public/Users/Social-Accounts/Get-GitHubSocialAccount.ps1 @@ -1,4 +1,4 @@ -filter Get-GitHubMyUserSocials { +function Get-GitHubUserSocialAccount { <# .SYNOPSIS List social accounts for the authenticated user @@ -7,7 +7,7 @@ Lists all of your social accounts. .EXAMPLE - Get-GitHubMyUserSocials + Get-GitHubUserSocialAccount Lists all of your social accounts. @@ -15,9 +15,18 @@ https://docs.github.com/rest/users/social-accounts#list-social-accounts-for-the-authenticated-user #> [OutputType([pscustomobject])] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseSingularNouns', '', Justification = 'Private function, not exposed to user.')] - [CmdletBinding()] + [CmdletBinding(SupportsPaging, DefaultParameterSetName = 'AuthenticatedUser')] param( + # The handle for the GitHub user account. + [Parameter( + Mandatory, + ParameterSetName = 'User', + ValueFromPipeline, + ValueFromPipelineByPropertyName + )] + [Alias('login')] + [string] $Username, + # The number of results per page (max 100). [Parameter()] [ValidateRange(0, 100)] @@ -37,24 +46,20 @@ } process { - try { - $body = @{ + $irmParams = @{ + APIEndpoint = $PScmdlet.ParameterSetName -eq 'AuthenticatedUser' ? '/user/social_accounts' : "/users/$Username/social_accounts" + Context = $Context + Method = 'GET' + QueryParameters = @{ per_page = $PerPage } - - $inputObject = @{ - Context = $Context - APIEndpoint = '/user/social_accounts' - Method = 'GET' - Body = $body - } - - Invoke-GitHubAPI @inputObject | ForEach-Object { - Write-Output $_.Response + } + foreach($_name in 'First','Skip') { + if ($PSBoundParameters.ContainsKey($_name)) { + $irmParams[$_name] = $_name } - } catch { - throw $_ } + Invoke-GitHubRestMethod @irmParams } end { diff --git a/src/variables/private/GitHub.ps1 b/src/variables/private/GitHub.ps1 index 9ca9b6847..1383610da 100644 --- a/src/variables/private/GitHub.ps1 +++ b/src/variables/private/GitHub.ps1 @@ -15,6 +15,7 @@ OAuthAppClientID = '7204ae9b0580f2cb8288' DefaultContext = '' ApiVersion = '2022-11-28' + HttpResponsesVariable = 'GITHUB_RESPONSES' HttpVersion = '2.0' PerPage = 100 }