diff --git a/src/classes/public/Context/GitHubContext.ps1 b/src/classes/public/Context/GitHubContext.ps1 index 736d8fdb9..2679bff48 100644 --- a/src/classes/public/Context/GitHubContext.ps1 +++ b/src/classes/public/Context/GitHubContext.ps1 @@ -53,6 +53,9 @@ class GitHubContext : Context { # The default value for the Repo parameter. [string] $Repo + # The default value for the 'per_page' API parameter used in 'Get' functions that support paging. + [int] $PerPage + # Simple parameterless constructor GitHubContext() {} diff --git a/src/functions/private/Organization/Blocking/Get-GitHubBlockedUserByOrganization.ps1 b/src/functions/private/Organization/Blocking/Get-GitHubBlockedUserByOrganization.ps1 index ab853e3cd..bdcac202b 100644 --- a/src/functions/private/Organization/Blocking/Get-GitHubBlockedUserByOrganization.ps1 +++ b/src/functions/private/Organization/Blocking/Get-GitHubBlockedUserByOrganization.ps1 @@ -26,8 +26,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Organization/Get-GitHubAllOrganization.ps1 b/src/functions/private/Organization/Get-GitHubAllOrganization.ps1 index bc9ffd38a..2c5f4fb5e 100644 --- a/src/functions/private/Organization/Get-GitHubAllOrganization.ps1 +++ b/src/functions/private/Organization/Get-GitHubAllOrganization.ps1 @@ -28,8 +28,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Organization/Get-GitHubMyOrganization.ps1 b/src/functions/private/Organization/Get-GitHubMyOrganization.ps1 index 87fb7e6c7..1a514936d 100644 --- a/src/functions/private/Organization/Get-GitHubMyOrganization.ps1 +++ b/src/functions/private/Organization/Get-GitHubMyOrganization.ps1 @@ -27,8 +27,8 @@ param( # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Organization/Get-GitHubUserOrganization.ps1 b/src/functions/private/Organization/Get-GitHubUserOrganization.ps1 index 7cb92bd20..a3544e76e 100644 --- a/src/functions/private/Organization/Get-GitHubUserOrganization.ps1 +++ b/src/functions/private/Organization/Get-GitHubUserOrganization.ps1 @@ -29,8 +29,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Releases/Assets/Get-GitHubReleaseAssetByReleaseID.ps1 b/src/functions/private/Releases/Assets/Get-GitHubReleaseAssetByReleaseID.ps1 index e66ad5871..3fa1252a6 100644 --- a/src/functions/private/Releases/Assets/Get-GitHubReleaseAssetByReleaseID.ps1 +++ b/src/functions/private/Releases/Assets/Get-GitHubReleaseAssetByReleaseID.ps1 @@ -35,8 +35,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Releases/Releases/Get-GitHubReleaseAll.ps1 b/src/functions/private/Releases/Releases/Get-GitHubReleaseAll.ps1 index f837c935a..e1305754d 100644 --- a/src/functions/private/Releases/Releases/Get-GitHubReleaseAll.ps1 +++ b/src/functions/private/Releases/Releases/Get-GitHubReleaseAll.ps1 @@ -29,8 +29,8 @@ # The number of results per page (max 100). [Parameter(ParameterSetName = 'AllUsers')] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Repositories/Repositories/Get-GitHubMyRepositories.ps1 b/src/functions/private/Repositories/Repositories/Get-GitHubMyRepositories.ps1 index d7b059111..169fc58fe 100644 --- a/src/functions/private/Repositories/Repositories/Get-GitHubMyRepositories.ps1 +++ b/src/functions/private/Repositories/Repositories/Get-GitHubMyRepositories.ps1 @@ -96,8 +96,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [ValidateRange(0, 100)] + [int] $PerPage, # Only show repositories updated after the given time. [Parameter()] diff --git a/src/functions/private/Repositories/Repositories/Get-GitHubRepositoryListByOrg.ps1 b/src/functions/private/Repositories/Repositories/Get-GitHubRepositoryListByOrg.ps1 index 23acd2fdb..e8ad3ed61 100644 --- a/src/functions/private/Repositories/Repositories/Get-GitHubRepositoryListByOrg.ps1 +++ b/src/functions/private/Repositories/Repositories/Get-GitHubRepositoryListByOrg.ps1 @@ -53,8 +53,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Repositories/Repositories/Get-GitHubRepositoryListByUser.ps1 b/src/functions/private/Repositories/Repositories/Get-GitHubRepositoryListByUser.ps1 index 7b72332f2..3aa6a7e50 100644 --- a/src/functions/private/Repositories/Repositories/Get-GitHubRepositoryListByUser.ps1 +++ b/src/functions/private/Repositories/Repositories/Get-GitHubRepositoryListByUser.ps1 @@ -55,8 +55,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Users/Blocking/Get-GitHubBlockedUserByUser.ps1 b/src/functions/private/Users/Blocking/Get-GitHubBlockedUserByUser.ps1 index 90d531ff6..070070e3b 100644 --- a/src/functions/private/Users/Blocking/Get-GitHubBlockedUserByUser.ps1 +++ b/src/functions/private/Users/Blocking/Get-GitHubBlockedUserByUser.ps1 @@ -19,8 +19,8 @@ param( # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Users/Blocking/Test-GitHubBlockedUserByUser.ps1 b/src/functions/private/Users/Blocking/Test-GitHubBlockedUserByUser.ps1 index feef9eb59..d524f20c2 100644 --- a/src/functions/private/Users/Blocking/Test-GitHubBlockedUserByUser.ps1 +++ b/src/functions/private/Users/Blocking/Test-GitHubBlockedUserByUser.ps1 @@ -31,8 +31,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Users/Emails/Get-GitHubUserAllEmail.ps1 b/src/functions/private/Users/Emails/Get-GitHubUserAllEmail.ps1 index da0042326..3920bc536 100644 --- a/src/functions/private/Users/Emails/Get-GitHubUserAllEmail.ps1 +++ b/src/functions/private/Users/Emails/Get-GitHubUserAllEmail.ps1 @@ -21,8 +21,8 @@ param( # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Users/Emails/Get-GitHubUserPublicEmail.ps1 b/src/functions/private/Users/Emails/Get-GitHubUserPublicEmail.ps1 index e24072277..8c2deebf5 100644 --- a/src/functions/private/Users/Emails/Get-GitHubUserPublicEmail.ps1 +++ b/src/functions/private/Users/Emails/Get-GitHubUserPublicEmail.ps1 @@ -23,8 +23,8 @@ param( # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Users/Followers/Get-GitHubUserFollowersOfUser.ps1 b/src/functions/private/Users/Followers/Get-GitHubUserFollowersOfUser.ps1 index c1d7dce87..dbf9efaae 100644 --- a/src/functions/private/Users/Followers/Get-GitHubUserFollowersOfUser.ps1 +++ b/src/functions/private/Users/Followers/Get-GitHubUserFollowersOfUser.ps1 @@ -29,8 +29,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Users/Followers/Get-GitHubUserFollowingMe.ps1 b/src/functions/private/Users/Followers/Get-GitHubUserFollowingMe.ps1 index 2dc1d96f5..e229a5ad3 100644 --- a/src/functions/private/Users/Followers/Get-GitHubUserFollowingMe.ps1 +++ b/src/functions/private/Users/Followers/Get-GitHubUserFollowingMe.ps1 @@ -20,8 +20,8 @@ param( # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Users/Followers/Get-GitHubUserFollowingUser.ps1 b/src/functions/private/Users/Followers/Get-GitHubUserFollowingUser.ps1 index 922fb05d4..66dff1aad 100644 --- a/src/functions/private/Users/Followers/Get-GitHubUserFollowingUser.ps1 +++ b/src/functions/private/Users/Followers/Get-GitHubUserFollowingUser.ps1 @@ -29,8 +29,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Users/Followers/Get-GitHubUserMyFollowers.ps1 b/src/functions/private/Users/Followers/Get-GitHubUserMyFollowers.ps1 index 0fd5940e4..e11bf9208 100644 --- a/src/functions/private/Users/Followers/Get-GitHubUserMyFollowers.ps1 +++ b/src/functions/private/Users/Followers/Get-GitHubUserMyFollowers.ps1 @@ -21,8 +21,8 @@ param( # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Users/GPG-Keys/Get-GitHubUserGpgKeyForUser.ps1 b/src/functions/private/Users/GPG-Keys/Get-GitHubUserGpgKeyForUser.ps1 index 4252cf890..e137fb97b 100644 --- a/src/functions/private/Users/GPG-Keys/Get-GitHubUserGpgKeyForUser.ps1 +++ b/src/functions/private/Users/GPG-Keys/Get-GitHubUserGpgKeyForUser.ps1 @@ -27,8 +27,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Users/GPG-Keys/Get-GitHubUserMyGpgKey.ps1 b/src/functions/private/Users/GPG-Keys/Get-GitHubUserMyGpgKey.ps1 index c1da300b6..45fdbe317 100644 --- a/src/functions/private/Users/GPG-Keys/Get-GitHubUserMyGpgKey.ps1 +++ b/src/functions/private/Users/GPG-Keys/Get-GitHubUserMyGpgKey.ps1 @@ -22,8 +22,8 @@ param( # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Users/Get-GitHubAllUser.ps1 b/src/functions/private/Users/Get-GitHubAllUser.ps1 index 5590c5898..45512ae12 100644 --- a/src/functions/private/Users/Get-GitHubAllUser.ps1 +++ b/src/functions/private/Users/Get-GitHubAllUser.ps1 @@ -27,8 +27,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Users/Keys/Get-GitHubUserKeyForUser.ps1 b/src/functions/private/Users/Keys/Get-GitHubUserKeyForUser.ps1 index 806522e5e..387d02866 100644 --- a/src/functions/private/Users/Keys/Get-GitHubUserKeyForUser.ps1 +++ b/src/functions/private/Users/Keys/Get-GitHubUserKeyForUser.ps1 @@ -27,8 +27,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Users/Keys/Get-GitHubUserMyKey.ps1 b/src/functions/private/Users/Keys/Get-GitHubUserMyKey.ps1 index 8de593888..6ac7cc4f4 100644 --- a/src/functions/private/Users/Keys/Get-GitHubUserMyKey.ps1 +++ b/src/functions/private/Users/Keys/Get-GitHubUserMyKey.ps1 @@ -22,8 +22,8 @@ param( # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Users/SSH-Signing-Keys/Get-GitHubUserMySigningKey.ps1 b/src/functions/private/Users/SSH-Signing-Keys/Get-GitHubUserMySigningKey.ps1 index 1f78dd47f..be19c95c8 100644 --- a/src/functions/private/Users/SSH-Signing-Keys/Get-GitHubUserMySigningKey.ps1 +++ b/src/functions/private/Users/SSH-Signing-Keys/Get-GitHubUserMySigningKey.ps1 @@ -22,8 +22,8 @@ param( # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Users/SSH-Signing-Keys/Get-GitHubUserSigningKeyForUser.ps1 b/src/functions/private/Users/SSH-Signing-Keys/Get-GitHubUserSigningKeyForUser.ps1 index 68339a6e9..742388a27 100644 --- a/src/functions/private/Users/SSH-Signing-Keys/Get-GitHubUserSigningKeyForUser.ps1 +++ b/src/functions/private/Users/SSH-Signing-Keys/Get-GitHubUserSigningKeyForUser.ps1 @@ -27,8 +27,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/private/Users/Social-Accounts/Get-GitHubMyUserSocials.ps1 b/src/functions/private/Users/Social-Accounts/Get-GitHubMyUserSocials.ps1 index 82ec04a28..b888f2aed 100644 --- a/src/functions/private/Users/Social-Accounts/Get-GitHubMyUserSocials.ps1 +++ b/src/functions/private/Users/Social-Accounts/Get-GitHubMyUserSocials.ps1 @@ -20,8 +20,8 @@ param( # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/public/API/Invoke-GitHubAPI.ps1 b/src/functions/public/API/Invoke-GitHubAPI.ps1 index 462390d62..1c71f940c 100644 --- a/src/functions/public/API/Invoke-GitHubAPI.ps1 +++ b/src/functions/public/API/Invoke-GitHubAPI.ps1 @@ -150,6 +150,11 @@ 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'] -eq 0) { + Write-Debug "Setting per_page to the default value in context [$($Context.PerPage)]." + $Body['per_page'] = $Context.PerPage + } $queryString = $Body | ConvertTo-QueryString $APICall.Uri = $APICall.Uri + $queryString } elseif ($Body -is [string]) { diff --git a/src/functions/public/Actions/Get-GitHubWorkflow.ps1 b/src/functions/public/Actions/Get-GitHubWorkflow.ps1 index 088d3fdff..3c6873902 100644 --- a/src/functions/public/Actions/Get-GitHubWorkflow.ps1 +++ b/src/functions/public/Actions/Get-GitHubWorkflow.ps1 @@ -31,8 +31,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/public/Actions/Get-GitHubWorkflowRun.ps1 b/src/functions/public/Actions/Get-GitHubWorkflowRun.ps1 index c39bb187d..cfe456e54 100644 --- a/src/functions/public/Actions/Get-GitHubWorkflowRun.ps1 +++ b/src/functions/public/Actions/Get-GitHubWorkflowRun.ps1 @@ -21,8 +21,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/public/Auth/Connect-GitHubAccount.ps1 b/src/functions/public/Auth/Connect-GitHubAccount.ps1 index 725b6338e..d760ee177 100644 --- a/src/functions/public/Auth/Connect-GitHubAccount.ps1 +++ b/src/functions/public/Auth/Connect-GitHubAccount.ps1 @@ -186,6 +186,7 @@ Enterprise = [string]$Enterprise Owner = [string]$Owner Repo = [string]$Repo + PerPage = 100 } Write-Verbose ($context | Format-Table | Out-String) diff --git a/src/functions/public/Organization/Get-GitHubOrganization.ps1 b/src/functions/public/Organization/Get-GitHubOrganization.ps1 index b05f7f767..b28609c6b 100644 --- a/src/functions/public/Organization/Get-GitHubOrganization.ps1 +++ b/src/functions/public/Organization/Get-GitHubOrganization.ps1 @@ -70,8 +70,8 @@ [Parameter(ParameterSetName = 'AllOrg')] [Parameter(ParameterSetName = 'UserOrg')] [Parameter(ParameterSetName = '__DefaultSet')] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/public/Organization/Get-GitHubOrganizationAppInstallation.ps1 b/src/functions/public/Organization/Get-GitHubOrganizationAppInstallation.ps1 index 2b0c12cc0..5c373d023 100644 --- a/src/functions/public/Organization/Get-GitHubOrganizationAppInstallation.ps1 +++ b/src/functions/public/Organization/Get-GitHubOrganizationAppInstallation.ps1 @@ -32,8 +32,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/public/Organization/Members/Get-GitHubOrganizationMember.ps1 b/src/functions/public/Organization/Members/Get-GitHubOrganizationMember.ps1 index bc4a939bf..24f6ef5ce 100644 --- a/src/functions/public/Organization/Members/Get-GitHubOrganizationMember.ps1 +++ b/src/functions/public/Organization/Members/Get-GitHubOrganizationMember.ps1 @@ -32,8 +32,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/public/Organization/Members/Get-GitHubOrganizationPendingInvitation.ps1 b/src/functions/public/Organization/Members/Get-GitHubOrganizationPendingInvitation.ps1 index f678434c0..e8f6baec3 100644 --- a/src/functions/public/Organization/Members/Get-GitHubOrganizationPendingInvitation.ps1 +++ b/src/functions/public/Organization/Members/Get-GitHubOrganizationPendingInvitation.ps1 @@ -31,8 +31,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/public/Releases/Releases/Get-GitHubRelease.ps1 b/src/functions/public/Releases/Releases/Get-GitHubRelease.ps1 index 9c6b2d46b..05e77d8dd 100644 --- a/src/functions/public/Releases/Releases/Get-GitHubRelease.ps1 +++ b/src/functions/public/Releases/Releases/Get-GitHubRelease.ps1 @@ -46,8 +46,8 @@ # The number of results per page (max 100). [Parameter(ParameterSetName = 'All')] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [ValidateRange(0, 100)] + [int] $PerPage, # Get the latest release only [Parameter( diff --git a/src/functions/public/Repositories/Repositories/Get-GitHubRepository.ps1 b/src/functions/public/Repositories/Repositories/Get-GitHubRepository.ps1 index 48a656123..3db6282b2 100644 --- a/src/functions/public/Repositories/Repositories/Get-GitHubRepository.ps1 +++ b/src/functions/public/Repositories/Repositories/Get-GitHubRepository.ps1 @@ -121,8 +121,8 @@ filter Get-GitHubRepository { [Parameter(ParameterSetName = 'MyRepos')] [Parameter(ParameterSetName = 'ListByOrg')] [Parameter(ParameterSetName = 'ListByUser')] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryActivity.ps1 b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryActivity.ps1 index c0d97e8ae..5acc9b836 100644 --- a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryActivity.ps1 +++ b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryActivity.ps1 @@ -68,9 +68,8 @@ # The number of results per page (max 100). # Default: 30 [Parameter()] - [ValidateRange(1, 100)] - [Alias('per_page')] - [int] $PerPage = 30, + [ValidateRange(0, 100)] + [int] $PerPage, # A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. [Parameter(ParameterSetName = 'BeforeAfter')] diff --git a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryContributor.ps1 b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryContributor.ps1 index 690948424..add2f3adc 100644 --- a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryContributor.ps1 +++ b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryContributor.ps1 @@ -37,8 +37,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryFork.ps1 b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryFork.ps1 index 260bd5680..10d39aea5 100644 --- a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryFork.ps1 +++ b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryFork.ps1 @@ -33,9 +33,8 @@ # The number of results per page. [Parameter()] - [ValidateRange(1, 100)] - [Alias('per_page')] - [int] $PerPage = 30, + [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. diff --git a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTag.ps1 b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTag.ps1 index 69ca4607a..b8a082631 100644 --- a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTag.ps1 +++ b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTag.ps1 @@ -29,8 +29,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTeam.ps1 b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTeam.ps1 index 782baf6f0..0f8a90836 100644 --- a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTeam.ps1 +++ b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTeam.ps1 @@ -37,8 +37,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTopic.ps1 b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTopic.ps1 index f9ca22815..81caa1d5c 100644 --- a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTopic.ps1 +++ b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTopic.ps1 @@ -25,8 +25,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/public/Repositories/RuleSuite/Get-GitHubRepositoryRuleSuite.ps1 b/src/functions/public/Repositories/RuleSuite/Get-GitHubRepositoryRuleSuite.ps1 index 30b23e94d..6222f9ae5 100644 --- a/src/functions/public/Repositories/RuleSuite/Get-GitHubRepositoryRuleSuite.ps1 +++ b/src/functions/public/Repositories/RuleSuite/Get-GitHubRepositoryRuleSuite.ps1 @@ -66,8 +66,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [ValidateRange(0, 100)] + [int] $PerPage, # The unique identifier of the rule suite result. To get this ID, you can use GET /repos/ { owner }/ { repo }/rulesets/rule-suites for repositories and GET /orgs/ { org }/rulesets/rule-suites for organizations. [Parameter( diff --git a/src/functions/public/Repositories/RuleSuite/Get-GitHubRepositoryRuleSuiteList.ps1 b/src/functions/public/Repositories/RuleSuite/Get-GitHubRepositoryRuleSuiteList.ps1 index 7d11ccd7d..70f28673e 100644 --- a/src/functions/public/Repositories/RuleSuite/Get-GitHubRepositoryRuleSuiteList.ps1 +++ b/src/functions/public/Repositories/RuleSuite/Get-GitHubRepositoryRuleSuiteList.ps1 @@ -60,8 +60,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/public/Users/Blocking/Get-GitHubBlockedUser.ps1 b/src/functions/public/Users/Blocking/Get-GitHubBlockedUser.ps1 index dfc248868..d9bb76988 100644 --- a/src/functions/public/Users/Blocking/Get-GitHubBlockedUser.ps1 +++ b/src/functions/public/Users/Blocking/Get-GitHubBlockedUser.ps1 @@ -35,8 +35,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/public/Users/Blocking/Test-GitHubBlockedUser.ps1 b/src/functions/public/Users/Blocking/Test-GitHubBlockedUser.ps1 index 2b057c0c0..466f2d029 100644 --- a/src/functions/public/Users/Blocking/Test-GitHubBlockedUser.ps1 +++ b/src/functions/public/Users/Blocking/Test-GitHubBlockedUser.ps1 @@ -47,8 +47,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/public/Users/Emails/Get-GitHubUserEmail.ps1 b/src/functions/public/Users/Emails/Get-GitHubUserEmail.ps1 index 641c7c5ea..4d80654ec 100644 --- a/src/functions/public/Users/Emails/Get-GitHubUserEmail.ps1 +++ b/src/functions/public/Users/Emails/Get-GitHubUserEmail.ps1 @@ -29,8 +29,8 @@ param( # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [ValidateRange(0, 100)] + [int] $PerPage, [Parameter()] [switch] $Public, diff --git a/src/functions/public/Users/Followers/Get-GitHubUserFollower.ps1 b/src/functions/public/Users/Followers/Get-GitHubUserFollower.ps1 index 0f512af95..fd880a302 100644 --- a/src/functions/public/Users/Followers/Get-GitHubUserFollower.ps1 +++ b/src/functions/public/Users/Followers/Get-GitHubUserFollower.ps1 @@ -33,8 +33,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/public/Users/Followers/Get-GitHubUserFollowing.ps1 b/src/functions/public/Users/Followers/Get-GitHubUserFollowing.ps1 index 939c0b4cd..9a60fc648 100644 --- a/src/functions/public/Users/Followers/Get-GitHubUserFollowing.ps1 +++ b/src/functions/public/Users/Followers/Get-GitHubUserFollowing.ps1 @@ -34,8 +34,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/public/Users/GPG-Keys/Get-GitHubUserGpgKey.ps1 b/src/functions/public/Users/GPG-Keys/Get-GitHubUserGpgKey.ps1 index 01157c2ac..039e82d3c 100644 --- a/src/functions/public/Users/GPG-Keys/Get-GitHubUserGpgKey.ps1 +++ b/src/functions/public/Users/GPG-Keys/Get-GitHubUserGpgKey.ps1 @@ -46,8 +46,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/public/Users/Get-GitHubUser.ps1 b/src/functions/public/Users/Get-GitHubUser.ps1 index 88a9a8b81..94115fcd0 100644 --- a/src/functions/public/Users/Get-GitHubUser.ps1 +++ b/src/functions/public/Users/Get-GitHubUser.ps1 @@ -55,8 +55,8 @@ # The number of results per page (max 100). [Parameter(ParameterSetName = 'AllUsers')] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/public/Users/Keys/Get-GitHubUserKey.ps1 b/src/functions/public/Users/Keys/Get-GitHubUserKey.ps1 index 0659b8d46..5605ec715 100644 --- a/src/functions/public/Users/Keys/Get-GitHubUserKey.ps1 +++ b/src/functions/public/Users/Keys/Get-GitHubUserKey.ps1 @@ -49,8 +49,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. diff --git a/src/functions/public/Users/SSH-Signing-Keys/Get-GitHubUserSigningKey.ps1 b/src/functions/public/Users/SSH-Signing-Keys/Get-GitHubUserSigningKey.ps1 index e81d09bf6..9a72c78cd 100644 --- a/src/functions/public/Users/SSH-Signing-Keys/Get-GitHubUserSigningKey.ps1 +++ b/src/functions/public/Users/SSH-Signing-Keys/Get-GitHubUserSigningKey.ps1 @@ -49,8 +49,8 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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.