diff --git a/src/classes/public/Context/GitHubContext.ps1 b/src/classes/public/Context/GitHubContext.ps1 index 736d8fdb..2679bff4 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 ab853e3c..bdcac202 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 bc9ffd38..2c5f4fb5 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 87fb7e6c..1a514936 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 7cb92bd2..a3544e76 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 e66ad587..3fa1252a 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 f837c935..e1305754 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 d7b05911..169fc58f 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 23acd2fd..e8ad3ed6 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 7b72332f..3aa6a7e5 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 90d531ff..070070e3 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 feef9eb5..d524f20c 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 da004232..3920bc53 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 e2407227..8c2deebf 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 c1d7dce8..dbf9efaa 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 2dc1d96f..e229a5ad 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 922fb05d..66dff1aa 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 0fd5940e..e11bf920 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 4252cf89..e137fb97 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 c1da300b..45fdbe31 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 5590c589..45512ae1 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 806522e5..387d0286 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 8de59388..6ac7cc4f 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 1f78dd47..be19c95c 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 68339a6e..742388a2 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 82ec04a2..b888f2ae 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 462390d6..1c71f940 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 088d3fdf..3c687390 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 c39bb187..cfe456e5 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 725b6338..d760ee17 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 b05f7f76..b28609c6 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 2b0c12cc..5c373d02 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 bc4a939b..24f6ef5c 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 f678434c..e8f6baec 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 9c6b2d46..05e77d8d 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 48a65612..3db6282b 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 c0d97e8a..5acc9b83 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 69094842..add2f3ad 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 260bd568..10d39aea 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 69ca4607..b8a08263 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 782baf6f..0f8a9083 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 f9ca2281..81caa1d5 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 30b23e94..6222f9ae 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 7d11ccd7..70f28673 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 dfc24886..d9bb7698 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 2b057c0c..466f2d02 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 641c7c5e..4d80654e 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 0f512af9..fd880a30 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 939c0b4c..9a60fc64 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 01157c2a..039e82d3 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 88a9a8b8..94115fcd 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 0659b8d4..5605ec71 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 e81d09bf..9a72c78c 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.