From 6816fad42967483dfa4e7f6daf20c2f0e6953da5 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 14 Dec 2024 23:53:57 +0100 Subject: [PATCH 1/7] Remove default value for paging on api functions --- .../Blocking/Get-GitHubBlockedUserByOrganization.ps1 | 2 +- .../private/Organization/Get-GitHubAllOrganization.ps1 | 2 +- .../private/Organization/Get-GitHubMyOrganization.ps1 | 2 +- .../private/Organization/Get-GitHubUserOrganization.ps1 | 2 +- .../Releases/Assets/Get-GitHubReleaseAssetByReleaseID.ps1 | 2 +- .../private/Releases/Releases/Get-GitHubReleaseAll.ps1 | 2 +- .../Repositories/Repositories/Get-GitHubMyRepositories.ps1 | 2 +- .../Repositories/Get-GitHubRepositoryListByOrg.ps1 | 2 +- .../Repositories/Get-GitHubRepositoryListByUser.ps1 | 2 +- .../private/Users/Blocking/Get-GitHubBlockedUserByUser.ps1 | 2 +- .../private/Users/Blocking/Test-GitHubBlockedUserByUser.ps1 | 2 +- src/functions/private/Users/Emails/Get-GitHubUserAllEmail.ps1 | 2 +- .../private/Users/Emails/Get-GitHubUserPublicEmail.ps1 | 2 +- .../private/Users/Followers/Get-GitHubUserFollowersOfUser.ps1 | 2 +- .../private/Users/Followers/Get-GitHubUserFollowingMe.ps1 | 2 +- .../private/Users/Followers/Get-GitHubUserFollowingUser.ps1 | 2 +- .../private/Users/Followers/Get-GitHubUserMyFollowers.ps1 | 2 +- .../private/Users/GPG-Keys/Get-GitHubUserGpgKeyForUser.ps1 | 2 +- .../private/Users/GPG-Keys/Get-GitHubUserMyGpgKey.ps1 | 2 +- src/functions/private/Users/Get-GitHubAllUser.ps1 | 2 +- src/functions/private/Users/Keys/Get-GitHubUserKeyForUser.ps1 | 2 +- src/functions/private/Users/Keys/Get-GitHubUserMyKey.ps1 | 2 +- .../Users/SSH-Signing-Keys/Get-GitHubUserMySigningKey.ps1 | 2 +- .../Users/SSH-Signing-Keys/Get-GitHubUserSigningKeyForUser.ps1 | 2 +- .../private/Users/Social-Accounts/Get-GitHubMyUserSocials.ps1 | 2 +- src/functions/public/Actions/Get-GitHubWorkflow.ps1 | 2 +- src/functions/public/Actions/Get-GitHubWorkflowRun.ps1 | 2 +- src/functions/public/Organization/Get-GitHubOrganization.ps1 | 2 +- .../Organization/Get-GitHubOrganizationAppInstallation.ps1 | 2 +- .../Organization/Members/Get-GitHubOrganizationMember.ps1 | 2 +- .../Members/Get-GitHubOrganizationPendingInvitation.ps1 | 2 +- src/functions/public/Releases/Releases/Get-GitHubRelease.ps1 | 2 +- .../public/Repositories/Repositories/Get-GitHubRepository.ps1 | 2 +- .../Repositories/Repositories/Get-GitHubRepositoryActivity.ps1 | 3 +-- .../Repositories/Get-GitHubRepositoryContributor.ps1 | 2 +- .../Repositories/Repositories/Get-GitHubRepositoryFork.ps1 | 3 +-- .../Repositories/Repositories/Get-GitHubRepositoryTag.ps1 | 2 +- .../Repositories/Repositories/Get-GitHubRepositoryTeam.ps1 | 2 +- .../Repositories/Repositories/Get-GitHubRepositoryTopic.ps1 | 2 +- .../Repositories/RuleSuite/Get-GitHubRepositoryRuleSuite.ps1 | 2 +- .../RuleSuite/Get-GitHubRepositoryRuleSuiteList.ps1 | 2 +- src/functions/public/Users/Blocking/Get-GitHubBlockedUser.ps1 | 2 +- src/functions/public/Users/Blocking/Test-GitHubBlockedUser.ps1 | 2 +- src/functions/public/Users/Emails/Get-GitHubUserEmail.ps1 | 2 +- .../public/Users/Followers/Get-GitHubUserFollower.ps1 | 2 +- .../public/Users/Followers/Get-GitHubUserFollowing.ps1 | 2 +- src/functions/public/Users/GPG-Keys/Get-GitHubUserGpgKey.ps1 | 2 +- src/functions/public/Users/Get-GitHubUser.ps1 | 2 +- src/functions/public/Users/Keys/Get-GitHubUserKey.ps1 | 2 +- .../public/Users/SSH-Signing-Keys/Get-GitHubUserSigningKey.ps1 | 2 +- 50 files changed, 50 insertions(+), 52 deletions(-) diff --git a/src/functions/private/Organization/Blocking/Get-GitHubBlockedUserByOrganization.ps1 b/src/functions/private/Organization/Blocking/Get-GitHubBlockedUserByOrganization.ps1 index ab853e3cd..bcb1d3c69 100644 --- a/src/functions/private/Organization/Blocking/Get-GitHubBlockedUserByOrganization.ps1 +++ b/src/functions/private/Organization/Blocking/Get-GitHubBlockedUserByOrganization.ps1 @@ -27,7 +27,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..9da644553 100644 --- a/src/functions/private/Organization/Get-GitHubAllOrganization.ps1 +++ b/src/functions/private/Organization/Get-GitHubAllOrganization.ps1 @@ -29,7 +29,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..101e1cd01 100644 --- a/src/functions/private/Organization/Get-GitHubMyOrganization.ps1 +++ b/src/functions/private/Organization/Get-GitHubMyOrganization.ps1 @@ -28,7 +28,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..3542631f7 100644 --- a/src/functions/private/Organization/Get-GitHubUserOrganization.ps1 +++ b/src/functions/private/Organization/Get-GitHubUserOrganization.ps1 @@ -30,7 +30,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..9ed3f8fb9 100644 --- a/src/functions/private/Releases/Assets/Get-GitHubReleaseAssetByReleaseID.ps1 +++ b/src/functions/private/Releases/Assets/Get-GitHubReleaseAssetByReleaseID.ps1 @@ -36,7 +36,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..3a24d7052 100644 --- a/src/functions/private/Releases/Releases/Get-GitHubReleaseAll.ps1 +++ b/src/functions/private/Releases/Releases/Get-GitHubReleaseAll.ps1 @@ -30,7 +30,7 @@ # The number of results per page (max 100). [Parameter(ParameterSetName = 'AllUsers')] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..cc466a069 100644 --- a/src/functions/private/Repositories/Repositories/Get-GitHubMyRepositories.ps1 +++ b/src/functions/private/Repositories/Repositories/Get-GitHubMyRepositories.ps1 @@ -97,7 +97,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..07d160ddc 100644 --- a/src/functions/private/Repositories/Repositories/Get-GitHubRepositoryListByOrg.ps1 +++ b/src/functions/private/Repositories/Repositories/Get-GitHubRepositoryListByOrg.ps1 @@ -54,7 +54,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..75493e636 100644 --- a/src/functions/private/Repositories/Repositories/Get-GitHubRepositoryListByUser.ps1 +++ b/src/functions/private/Repositories/Repositories/Get-GitHubRepositoryListByUser.ps1 @@ -56,7 +56,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..da1c99313 100644 --- a/src/functions/private/Users/Blocking/Get-GitHubBlockedUserByUser.ps1 +++ b/src/functions/private/Users/Blocking/Get-GitHubBlockedUserByUser.ps1 @@ -20,7 +20,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..3d95654ba 100644 --- a/src/functions/private/Users/Blocking/Test-GitHubBlockedUserByUser.ps1 +++ b/src/functions/private/Users/Blocking/Test-GitHubBlockedUserByUser.ps1 @@ -32,7 +32,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..e8bb025f7 100644 --- a/src/functions/private/Users/Emails/Get-GitHubUserAllEmail.ps1 +++ b/src/functions/private/Users/Emails/Get-GitHubUserAllEmail.ps1 @@ -22,7 +22,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..537ac3d6d 100644 --- a/src/functions/private/Users/Emails/Get-GitHubUserPublicEmail.ps1 +++ b/src/functions/private/Users/Emails/Get-GitHubUserPublicEmail.ps1 @@ -24,7 +24,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..f0d2803b4 100644 --- a/src/functions/private/Users/Followers/Get-GitHubUserFollowersOfUser.ps1 +++ b/src/functions/private/Users/Followers/Get-GitHubUserFollowersOfUser.ps1 @@ -30,7 +30,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..9adf08a7d 100644 --- a/src/functions/private/Users/Followers/Get-GitHubUserFollowingMe.ps1 +++ b/src/functions/private/Users/Followers/Get-GitHubUserFollowingMe.ps1 @@ -21,7 +21,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..782ea28a4 100644 --- a/src/functions/private/Users/Followers/Get-GitHubUserFollowingUser.ps1 +++ b/src/functions/private/Users/Followers/Get-GitHubUserFollowingUser.ps1 @@ -30,7 +30,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..a663a4cb0 100644 --- a/src/functions/private/Users/Followers/Get-GitHubUserMyFollowers.ps1 +++ b/src/functions/private/Users/Followers/Get-GitHubUserMyFollowers.ps1 @@ -22,7 +22,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..4d34bef19 100644 --- a/src/functions/private/Users/GPG-Keys/Get-GitHubUserGpgKeyForUser.ps1 +++ b/src/functions/private/Users/GPG-Keys/Get-GitHubUserGpgKeyForUser.ps1 @@ -28,7 +28,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..955b2ed9b 100644 --- a/src/functions/private/Users/GPG-Keys/Get-GitHubUserMyGpgKey.ps1 +++ b/src/functions/private/Users/GPG-Keys/Get-GitHubUserMyGpgKey.ps1 @@ -23,7 +23,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..9c459130f 100644 --- a/src/functions/private/Users/Get-GitHubAllUser.ps1 +++ b/src/functions/private/Users/Get-GitHubAllUser.ps1 @@ -28,7 +28,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..46ac6b6dc 100644 --- a/src/functions/private/Users/Keys/Get-GitHubUserKeyForUser.ps1 +++ b/src/functions/private/Users/Keys/Get-GitHubUserKeyForUser.ps1 @@ -28,7 +28,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..d981138f9 100644 --- a/src/functions/private/Users/Keys/Get-GitHubUserMyKey.ps1 +++ b/src/functions/private/Users/Keys/Get-GitHubUserMyKey.ps1 @@ -23,7 +23,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..ce3a6412e 100644 --- a/src/functions/private/Users/SSH-Signing-Keys/Get-GitHubUserMySigningKey.ps1 +++ b/src/functions/private/Users/SSH-Signing-Keys/Get-GitHubUserMySigningKey.ps1 @@ -23,7 +23,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..6a10fbc70 100644 --- a/src/functions/private/Users/SSH-Signing-Keys/Get-GitHubUserSigningKeyForUser.ps1 +++ b/src/functions/private/Users/SSH-Signing-Keys/Get-GitHubUserSigningKeyForUser.ps1 @@ -28,7 +28,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..1ccc4a08d 100644 --- a/src/functions/private/Users/Social-Accounts/Get-GitHubMyUserSocials.ps1 +++ b/src/functions/private/Users/Social-Accounts/Get-GitHubMyUserSocials.ps1 @@ -21,7 +21,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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-GitHubWorkflow.ps1 b/src/functions/public/Actions/Get-GitHubWorkflow.ps1 index 088d3fdff..2b27ae2c0 100644 --- a/src/functions/public/Actions/Get-GitHubWorkflow.ps1 +++ b/src/functions/public/Actions/Get-GitHubWorkflow.ps1 @@ -32,7 +32,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..390d7031a 100644 --- a/src/functions/public/Actions/Get-GitHubWorkflowRun.ps1 +++ b/src/functions/public/Actions/Get-GitHubWorkflowRun.ps1 @@ -22,7 +22,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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-GitHubOrganization.ps1 b/src/functions/public/Organization/Get-GitHubOrganization.ps1 index b05f7f767..7dde63330 100644 --- a/src/functions/public/Organization/Get-GitHubOrganization.ps1 +++ b/src/functions/public/Organization/Get-GitHubOrganization.ps1 @@ -71,7 +71,7 @@ [Parameter(ParameterSetName = 'UserOrg')] [Parameter(ParameterSetName = '__DefaultSet')] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..f6027e610 100644 --- a/src/functions/public/Organization/Get-GitHubOrganizationAppInstallation.ps1 +++ b/src/functions/public/Organization/Get-GitHubOrganizationAppInstallation.ps1 @@ -33,7 +33,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..6f96bd002 100644 --- a/src/functions/public/Organization/Members/Get-GitHubOrganizationMember.ps1 +++ b/src/functions/public/Organization/Members/Get-GitHubOrganizationMember.ps1 @@ -33,7 +33,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..ebcb36e6d 100644 --- a/src/functions/public/Organization/Members/Get-GitHubOrganizationPendingInvitation.ps1 +++ b/src/functions/public/Organization/Members/Get-GitHubOrganizationPendingInvitation.ps1 @@ -32,7 +32,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..ae4ac5ac9 100644 --- a/src/functions/public/Releases/Releases/Get-GitHubRelease.ps1 +++ b/src/functions/public/Releases/Releases/Get-GitHubRelease.ps1 @@ -47,7 +47,7 @@ # The number of results per page (max 100). [Parameter(ParameterSetName = 'All')] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..73443594e 100644 --- a/src/functions/public/Repositories/Repositories/Get-GitHubRepository.ps1 +++ b/src/functions/public/Repositories/Repositories/Get-GitHubRepository.ps1 @@ -122,7 +122,7 @@ filter Get-GitHubRepository { [Parameter(ParameterSetName = 'ListByOrg')] [Parameter(ParameterSetName = 'ListByUser')] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..2d7859637 100644 --- a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryActivity.ps1 +++ b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryActivity.ps1 @@ -69,8 +69,7 @@ # Default: 30 [Parameter()] [ValidateRange(1, 100)] - [Alias('per_page')] - [int] $PerPage = 30, + [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..f53890571 100644 --- a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryContributor.ps1 +++ b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryContributor.ps1 @@ -38,7 +38,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..23279fc2e 100644 --- a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryFork.ps1 +++ b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryFork.ps1 @@ -34,8 +34,7 @@ # The number of results per page. [Parameter()] [ValidateRange(1, 100)] - [Alias('per_page')] - [int] $PerPage = 30, + [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..b8cf17886 100644 --- a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTag.ps1 +++ b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTag.ps1 @@ -30,7 +30,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..32275b33a 100644 --- a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTeam.ps1 +++ b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTeam.ps1 @@ -38,7 +38,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..9c95fe224 100644 --- a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTopic.ps1 +++ b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTopic.ps1 @@ -26,7 +26,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..e5c00d80b 100644 --- a/src/functions/public/Repositories/RuleSuite/Get-GitHubRepositoryRuleSuite.ps1 +++ b/src/functions/public/Repositories/RuleSuite/Get-GitHubRepositoryRuleSuite.ps1 @@ -67,7 +67,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..5a7483303 100644 --- a/src/functions/public/Repositories/RuleSuite/Get-GitHubRepositoryRuleSuiteList.ps1 +++ b/src/functions/public/Repositories/RuleSuite/Get-GitHubRepositoryRuleSuiteList.ps1 @@ -61,7 +61,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..d0f4cde44 100644 --- a/src/functions/public/Users/Blocking/Get-GitHubBlockedUser.ps1 +++ b/src/functions/public/Users/Blocking/Get-GitHubBlockedUser.ps1 @@ -36,7 +36,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..37362fd7e 100644 --- a/src/functions/public/Users/Blocking/Test-GitHubBlockedUser.ps1 +++ b/src/functions/public/Users/Blocking/Test-GitHubBlockedUser.ps1 @@ -48,7 +48,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..4d32fc269 100644 --- a/src/functions/public/Users/Emails/Get-GitHubUserEmail.ps1 +++ b/src/functions/public/Users/Emails/Get-GitHubUserEmail.ps1 @@ -30,7 +30,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..133ed8ab1 100644 --- a/src/functions/public/Users/Followers/Get-GitHubUserFollower.ps1 +++ b/src/functions/public/Users/Followers/Get-GitHubUserFollower.ps1 @@ -34,7 +34,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..02d6e5860 100644 --- a/src/functions/public/Users/Followers/Get-GitHubUserFollowing.ps1 +++ b/src/functions/public/Users/Followers/Get-GitHubUserFollowing.ps1 @@ -35,7 +35,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..7fe277e44 100644 --- a/src/functions/public/Users/GPG-Keys/Get-GitHubUserGpgKey.ps1 +++ b/src/functions/public/Users/GPG-Keys/Get-GitHubUserGpgKey.ps1 @@ -47,7 +47,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..f86cef118 100644 --- a/src/functions/public/Users/Get-GitHubUser.ps1 +++ b/src/functions/public/Users/Get-GitHubUser.ps1 @@ -56,7 +56,7 @@ # The number of results per page (max 100). [Parameter(ParameterSetName = 'AllUsers')] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..b13fa0136 100644 --- a/src/functions/public/Users/Keys/Get-GitHubUserKey.ps1 +++ b/src/functions/public/Users/Keys/Get-GitHubUserKey.ps1 @@ -50,7 +50,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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..1c6927c26 100644 --- a/src/functions/public/Users/SSH-Signing-Keys/Get-GitHubUserSigningKey.ps1 +++ b/src/functions/public/Users/SSH-Signing-Keys/Get-GitHubUserSigningKey.ps1 @@ -50,7 +50,7 @@ # The number of results per page (max 100). [Parameter()] [ValidateRange(1, 100)] - [int] $PerPage = 30, + [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. From a6603a9bc150d052dbd01b9e175391773dc37465 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 15 Dec 2024 00:21:16 +0100 Subject: [PATCH 2/7] Set contexts PerPage value in API call if not provided in request body --- src/functions/public/API/Invoke-GitHubAPI.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/functions/public/API/Invoke-GitHubAPI.ps1 b/src/functions/public/API/Invoke-GitHubAPI.ps1 index 462390d62..09321916d 100644 --- a/src/functions/public/API/Invoke-GitHubAPI.ps1 +++ b/src/functions/public/API/Invoke-GitHubAPI.ps1 @@ -150,6 +150,10 @@ 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.ContainsKey('per_page') -and $null -eq $Body['per_page']) { + $Body['per_page'] = $Context.PerPage + } $queryString = $Body | ConvertTo-QueryString $APICall.Uri = $APICall.Uri + $queryString } elseif ($Body -is [string]) { From 21b25d158544efa2d569e4ad977b26a665ba8308 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 15 Dec 2024 00:24:35 +0100 Subject: [PATCH 3/7] Add property for 'PerPage' on the GitHubContext class --- src/classes/public/Context/GitHubContext.ps1 | 3 +++ 1 file changed, 3 insertions(+) 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() {} From 1241c2d874b53375451981888e873e0d92705d66 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 15 Dec 2024 00:24:42 +0100 Subject: [PATCH 4/7] Set default PerPage value to 100 in Connect-GitHubAccount function --- src/functions/public/Auth/Connect-GitHubAccount.ps1 | 1 + 1 file changed, 1 insertion(+) 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) From 429970f92c996385f432fdedbe1d8bdc07e4d02d Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 15 Dec 2024 00:51:40 +0100 Subject: [PATCH 5/7] Update PerPage parameter validation to allow zero --- .../Blocking/Get-GitHubBlockedUserByOrganization.ps1 | 2 +- .../private/Organization/Get-GitHubAllOrganization.ps1 | 2 +- src/functions/private/Organization/Get-GitHubMyOrganization.ps1 | 2 +- .../private/Organization/Get-GitHubUserOrganization.ps1 | 2 +- .../Releases/Assets/Get-GitHubReleaseAssetByReleaseID.ps1 | 2 +- .../private/Releases/Releases/Get-GitHubReleaseAll.ps1 | 2 +- .../Repositories/Repositories/Get-GitHubMyRepositories.ps1 | 2 +- .../Repositories/Repositories/Get-GitHubRepositoryListByOrg.ps1 | 2 +- .../Repositories/Get-GitHubRepositoryListByUser.ps1 | 2 +- .../private/Users/Blocking/Get-GitHubBlockedUserByUser.ps1 | 2 +- .../private/Users/Blocking/Test-GitHubBlockedUserByUser.ps1 | 2 +- src/functions/private/Users/Emails/Get-GitHubUserAllEmail.ps1 | 2 +- .../private/Users/Emails/Get-GitHubUserPublicEmail.ps1 | 2 +- .../private/Users/Followers/Get-GitHubUserFollowersOfUser.ps1 | 2 +- .../private/Users/Followers/Get-GitHubUserFollowingMe.ps1 | 2 +- .../private/Users/Followers/Get-GitHubUserFollowingUser.ps1 | 2 +- .../private/Users/Followers/Get-GitHubUserMyFollowers.ps1 | 2 +- .../private/Users/GPG-Keys/Get-GitHubUserGpgKeyForUser.ps1 | 2 +- src/functions/private/Users/GPG-Keys/Get-GitHubUserMyGpgKey.ps1 | 2 +- src/functions/private/Users/Get-GitHubAllUser.ps1 | 2 +- src/functions/private/Users/Keys/Get-GitHubUserKeyForUser.ps1 | 2 +- src/functions/private/Users/Keys/Get-GitHubUserMyKey.ps1 | 2 +- .../Users/SSH-Signing-Keys/Get-GitHubUserMySigningKey.ps1 | 2 +- .../Users/SSH-Signing-Keys/Get-GitHubUserSigningKeyForUser.ps1 | 2 +- .../private/Users/Social-Accounts/Get-GitHubMyUserSocials.ps1 | 2 +- src/functions/public/Actions/Get-GitHubWorkflow.ps1 | 2 +- src/functions/public/Actions/Get-GitHubWorkflowRun.ps1 | 2 +- src/functions/public/Organization/Get-GitHubOrganization.ps1 | 2 +- .../Organization/Get-GitHubOrganizationAppInstallation.ps1 | 2 +- .../Organization/Members/Get-GitHubOrganizationMember.ps1 | 2 +- .../Members/Get-GitHubOrganizationPendingInvitation.ps1 | 2 +- src/functions/public/Releases/Releases/Get-GitHubRelease.ps1 | 2 +- .../public/Repositories/Repositories/Get-GitHubRepository.ps1 | 2 +- .../Repositories/Repositories/Get-GitHubRepositoryActivity.ps1 | 2 +- .../Repositories/Get-GitHubRepositoryContributor.ps1 | 2 +- .../Repositories/Repositories/Get-GitHubRepositoryFork.ps1 | 2 +- .../Repositories/Repositories/Get-GitHubRepositoryTag.ps1 | 2 +- .../Repositories/Repositories/Get-GitHubRepositoryTeam.ps1 | 2 +- .../Repositories/Repositories/Get-GitHubRepositoryTopic.ps1 | 2 +- .../Repositories/RuleSuite/Get-GitHubRepositoryRuleSuite.ps1 | 2 +- .../RuleSuite/Get-GitHubRepositoryRuleSuiteList.ps1 | 2 +- src/functions/public/Users/Blocking/Get-GitHubBlockedUser.ps1 | 2 +- src/functions/public/Users/Blocking/Test-GitHubBlockedUser.ps1 | 2 +- src/functions/public/Users/Emails/Get-GitHubUserEmail.ps1 | 2 +- src/functions/public/Users/Followers/Get-GitHubUserFollower.ps1 | 2 +- .../public/Users/Followers/Get-GitHubUserFollowing.ps1 | 2 +- src/functions/public/Users/GPG-Keys/Get-GitHubUserGpgKey.ps1 | 2 +- src/functions/public/Users/Get-GitHubUser.ps1 | 2 +- src/functions/public/Users/Keys/Get-GitHubUserKey.ps1 | 2 +- .../public/Users/SSH-Signing-Keys/Get-GitHubUserSigningKey.ps1 | 2 +- 50 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/functions/private/Organization/Blocking/Get-GitHubBlockedUserByOrganization.ps1 b/src/functions/private/Organization/Blocking/Get-GitHubBlockedUserByOrganization.ps1 index bcb1d3c69..bdcac202b 100644 --- a/src/functions/private/Organization/Blocking/Get-GitHubBlockedUserByOrganization.ps1 +++ b/src/functions/private/Organization/Blocking/Get-GitHubBlockedUserByOrganization.ps1 @@ -26,7 +26,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/private/Organization/Get-GitHubAllOrganization.ps1 b/src/functions/private/Organization/Get-GitHubAllOrganization.ps1 index 9da644553..2c5f4fb5e 100644 --- a/src/functions/private/Organization/Get-GitHubAllOrganization.ps1 +++ b/src/functions/private/Organization/Get-GitHubAllOrganization.ps1 @@ -28,7 +28,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/private/Organization/Get-GitHubMyOrganization.ps1 b/src/functions/private/Organization/Get-GitHubMyOrganization.ps1 index 101e1cd01..1a514936d 100644 --- a/src/functions/private/Organization/Get-GitHubMyOrganization.ps1 +++ b/src/functions/private/Organization/Get-GitHubMyOrganization.ps1 @@ -27,7 +27,7 @@ param( # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/private/Organization/Get-GitHubUserOrganization.ps1 b/src/functions/private/Organization/Get-GitHubUserOrganization.ps1 index 3542631f7..a3544e76e 100644 --- a/src/functions/private/Organization/Get-GitHubUserOrganization.ps1 +++ b/src/functions/private/Organization/Get-GitHubUserOrganization.ps1 @@ -29,7 +29,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/private/Releases/Assets/Get-GitHubReleaseAssetByReleaseID.ps1 b/src/functions/private/Releases/Assets/Get-GitHubReleaseAssetByReleaseID.ps1 index 9ed3f8fb9..3fa1252a6 100644 --- a/src/functions/private/Releases/Assets/Get-GitHubReleaseAssetByReleaseID.ps1 +++ b/src/functions/private/Releases/Assets/Get-GitHubReleaseAssetByReleaseID.ps1 @@ -35,7 +35,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/private/Releases/Releases/Get-GitHubReleaseAll.ps1 b/src/functions/private/Releases/Releases/Get-GitHubReleaseAll.ps1 index 3a24d7052..e1305754d 100644 --- a/src/functions/private/Releases/Releases/Get-GitHubReleaseAll.ps1 +++ b/src/functions/private/Releases/Releases/Get-GitHubReleaseAll.ps1 @@ -29,7 +29,7 @@ # The number of results per page (max 100). [Parameter(ParameterSetName = 'AllUsers')] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/private/Repositories/Repositories/Get-GitHubMyRepositories.ps1 b/src/functions/private/Repositories/Repositories/Get-GitHubMyRepositories.ps1 index cc466a069..169fc58fe 100644 --- a/src/functions/private/Repositories/Repositories/Get-GitHubMyRepositories.ps1 +++ b/src/functions/private/Repositories/Repositories/Get-GitHubMyRepositories.ps1 @@ -96,7 +96,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # Only show repositories updated after the given time. diff --git a/src/functions/private/Repositories/Repositories/Get-GitHubRepositoryListByOrg.ps1 b/src/functions/private/Repositories/Repositories/Get-GitHubRepositoryListByOrg.ps1 index 07d160ddc..e8ad3ed61 100644 --- a/src/functions/private/Repositories/Repositories/Get-GitHubRepositoryListByOrg.ps1 +++ b/src/functions/private/Repositories/Repositories/Get-GitHubRepositoryListByOrg.ps1 @@ -53,7 +53,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/private/Repositories/Repositories/Get-GitHubRepositoryListByUser.ps1 b/src/functions/private/Repositories/Repositories/Get-GitHubRepositoryListByUser.ps1 index 75493e636..3aa6a7e50 100644 --- a/src/functions/private/Repositories/Repositories/Get-GitHubRepositoryListByUser.ps1 +++ b/src/functions/private/Repositories/Repositories/Get-GitHubRepositoryListByUser.ps1 @@ -55,7 +55,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/private/Users/Blocking/Get-GitHubBlockedUserByUser.ps1 b/src/functions/private/Users/Blocking/Get-GitHubBlockedUserByUser.ps1 index da1c99313..070070e3b 100644 --- a/src/functions/private/Users/Blocking/Get-GitHubBlockedUserByUser.ps1 +++ b/src/functions/private/Users/Blocking/Get-GitHubBlockedUserByUser.ps1 @@ -19,7 +19,7 @@ param( # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/private/Users/Blocking/Test-GitHubBlockedUserByUser.ps1 b/src/functions/private/Users/Blocking/Test-GitHubBlockedUserByUser.ps1 index 3d95654ba..d524f20c2 100644 --- a/src/functions/private/Users/Blocking/Test-GitHubBlockedUserByUser.ps1 +++ b/src/functions/private/Users/Blocking/Test-GitHubBlockedUserByUser.ps1 @@ -31,7 +31,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/private/Users/Emails/Get-GitHubUserAllEmail.ps1 b/src/functions/private/Users/Emails/Get-GitHubUserAllEmail.ps1 index e8bb025f7..3920bc536 100644 --- a/src/functions/private/Users/Emails/Get-GitHubUserAllEmail.ps1 +++ b/src/functions/private/Users/Emails/Get-GitHubUserAllEmail.ps1 @@ -21,7 +21,7 @@ param( # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/private/Users/Emails/Get-GitHubUserPublicEmail.ps1 b/src/functions/private/Users/Emails/Get-GitHubUserPublicEmail.ps1 index 537ac3d6d..8c2deebf5 100644 --- a/src/functions/private/Users/Emails/Get-GitHubUserPublicEmail.ps1 +++ b/src/functions/private/Users/Emails/Get-GitHubUserPublicEmail.ps1 @@ -23,7 +23,7 @@ param( # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/private/Users/Followers/Get-GitHubUserFollowersOfUser.ps1 b/src/functions/private/Users/Followers/Get-GitHubUserFollowersOfUser.ps1 index f0d2803b4..dbf9efaae 100644 --- a/src/functions/private/Users/Followers/Get-GitHubUserFollowersOfUser.ps1 +++ b/src/functions/private/Users/Followers/Get-GitHubUserFollowersOfUser.ps1 @@ -29,7 +29,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/private/Users/Followers/Get-GitHubUserFollowingMe.ps1 b/src/functions/private/Users/Followers/Get-GitHubUserFollowingMe.ps1 index 9adf08a7d..e229a5ad3 100644 --- a/src/functions/private/Users/Followers/Get-GitHubUserFollowingMe.ps1 +++ b/src/functions/private/Users/Followers/Get-GitHubUserFollowingMe.ps1 @@ -20,7 +20,7 @@ param( # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/private/Users/Followers/Get-GitHubUserFollowingUser.ps1 b/src/functions/private/Users/Followers/Get-GitHubUserFollowingUser.ps1 index 782ea28a4..66dff1aad 100644 --- a/src/functions/private/Users/Followers/Get-GitHubUserFollowingUser.ps1 +++ b/src/functions/private/Users/Followers/Get-GitHubUserFollowingUser.ps1 @@ -29,7 +29,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/private/Users/Followers/Get-GitHubUserMyFollowers.ps1 b/src/functions/private/Users/Followers/Get-GitHubUserMyFollowers.ps1 index a663a4cb0..e11bf9208 100644 --- a/src/functions/private/Users/Followers/Get-GitHubUserMyFollowers.ps1 +++ b/src/functions/private/Users/Followers/Get-GitHubUserMyFollowers.ps1 @@ -21,7 +21,7 @@ param( # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/private/Users/GPG-Keys/Get-GitHubUserGpgKeyForUser.ps1 b/src/functions/private/Users/GPG-Keys/Get-GitHubUserGpgKeyForUser.ps1 index 4d34bef19..e137fb97b 100644 --- a/src/functions/private/Users/GPG-Keys/Get-GitHubUserGpgKeyForUser.ps1 +++ b/src/functions/private/Users/GPG-Keys/Get-GitHubUserGpgKeyForUser.ps1 @@ -27,7 +27,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/private/Users/GPG-Keys/Get-GitHubUserMyGpgKey.ps1 b/src/functions/private/Users/GPG-Keys/Get-GitHubUserMyGpgKey.ps1 index 955b2ed9b..45fdbe317 100644 --- a/src/functions/private/Users/GPG-Keys/Get-GitHubUserMyGpgKey.ps1 +++ b/src/functions/private/Users/GPG-Keys/Get-GitHubUserMyGpgKey.ps1 @@ -22,7 +22,7 @@ param( # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/private/Users/Get-GitHubAllUser.ps1 b/src/functions/private/Users/Get-GitHubAllUser.ps1 index 9c459130f..45512ae12 100644 --- a/src/functions/private/Users/Get-GitHubAllUser.ps1 +++ b/src/functions/private/Users/Get-GitHubAllUser.ps1 @@ -27,7 +27,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/private/Users/Keys/Get-GitHubUserKeyForUser.ps1 b/src/functions/private/Users/Keys/Get-GitHubUserKeyForUser.ps1 index 46ac6b6dc..387d02866 100644 --- a/src/functions/private/Users/Keys/Get-GitHubUserKeyForUser.ps1 +++ b/src/functions/private/Users/Keys/Get-GitHubUserKeyForUser.ps1 @@ -27,7 +27,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/private/Users/Keys/Get-GitHubUserMyKey.ps1 b/src/functions/private/Users/Keys/Get-GitHubUserMyKey.ps1 index d981138f9..6ac7cc4f4 100644 --- a/src/functions/private/Users/Keys/Get-GitHubUserMyKey.ps1 +++ b/src/functions/private/Users/Keys/Get-GitHubUserMyKey.ps1 @@ -22,7 +22,7 @@ param( # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. 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 ce3a6412e..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,7 +22,7 @@ param( # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. 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 6a10fbc70..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,7 +27,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/private/Users/Social-Accounts/Get-GitHubMyUserSocials.ps1 b/src/functions/private/Users/Social-Accounts/Get-GitHubMyUserSocials.ps1 index 1ccc4a08d..b888f2aed 100644 --- a/src/functions/private/Users/Social-Accounts/Get-GitHubMyUserSocials.ps1 +++ b/src/functions/private/Users/Social-Accounts/Get-GitHubMyUserSocials.ps1 @@ -20,7 +20,7 @@ param( # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/public/Actions/Get-GitHubWorkflow.ps1 b/src/functions/public/Actions/Get-GitHubWorkflow.ps1 index 2b27ae2c0..3c6873902 100644 --- a/src/functions/public/Actions/Get-GitHubWorkflow.ps1 +++ b/src/functions/public/Actions/Get-GitHubWorkflow.ps1 @@ -31,7 +31,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/public/Actions/Get-GitHubWorkflowRun.ps1 b/src/functions/public/Actions/Get-GitHubWorkflowRun.ps1 index 390d7031a..cfe456e54 100644 --- a/src/functions/public/Actions/Get-GitHubWorkflowRun.ps1 +++ b/src/functions/public/Actions/Get-GitHubWorkflowRun.ps1 @@ -21,7 +21,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/public/Organization/Get-GitHubOrganization.ps1 b/src/functions/public/Organization/Get-GitHubOrganization.ps1 index 7dde63330..b28609c6b 100644 --- a/src/functions/public/Organization/Get-GitHubOrganization.ps1 +++ b/src/functions/public/Organization/Get-GitHubOrganization.ps1 @@ -70,7 +70,7 @@ [Parameter(ParameterSetName = 'AllOrg')] [Parameter(ParameterSetName = 'UserOrg')] [Parameter(ParameterSetName = '__DefaultSet')] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/public/Organization/Get-GitHubOrganizationAppInstallation.ps1 b/src/functions/public/Organization/Get-GitHubOrganizationAppInstallation.ps1 index f6027e610..5c373d023 100644 --- a/src/functions/public/Organization/Get-GitHubOrganizationAppInstallation.ps1 +++ b/src/functions/public/Organization/Get-GitHubOrganizationAppInstallation.ps1 @@ -32,7 +32,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/public/Organization/Members/Get-GitHubOrganizationMember.ps1 b/src/functions/public/Organization/Members/Get-GitHubOrganizationMember.ps1 index 6f96bd002..24f6ef5ce 100644 --- a/src/functions/public/Organization/Members/Get-GitHubOrganizationMember.ps1 +++ b/src/functions/public/Organization/Members/Get-GitHubOrganizationMember.ps1 @@ -32,7 +32,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/public/Organization/Members/Get-GitHubOrganizationPendingInvitation.ps1 b/src/functions/public/Organization/Members/Get-GitHubOrganizationPendingInvitation.ps1 index ebcb36e6d..e8f6baec3 100644 --- a/src/functions/public/Organization/Members/Get-GitHubOrganizationPendingInvitation.ps1 +++ b/src/functions/public/Organization/Members/Get-GitHubOrganizationPendingInvitation.ps1 @@ -31,7 +31,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/public/Releases/Releases/Get-GitHubRelease.ps1 b/src/functions/public/Releases/Releases/Get-GitHubRelease.ps1 index ae4ac5ac9..05e77d8dd 100644 --- a/src/functions/public/Releases/Releases/Get-GitHubRelease.ps1 +++ b/src/functions/public/Releases/Releases/Get-GitHubRelease.ps1 @@ -46,7 +46,7 @@ # The number of results per page (max 100). [Parameter(ParameterSetName = 'All')] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # Get the latest release only diff --git a/src/functions/public/Repositories/Repositories/Get-GitHubRepository.ps1 b/src/functions/public/Repositories/Repositories/Get-GitHubRepository.ps1 index 73443594e..3db6282b2 100644 --- a/src/functions/public/Repositories/Repositories/Get-GitHubRepository.ps1 +++ b/src/functions/public/Repositories/Repositories/Get-GitHubRepository.ps1 @@ -121,7 +121,7 @@ filter Get-GitHubRepository { [Parameter(ParameterSetName = 'MyRepos')] [Parameter(ParameterSetName = 'ListByOrg')] [Parameter(ParameterSetName = 'ListByUser')] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryActivity.ps1 b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryActivity.ps1 index 2d7859637..5acc9b836 100644 --- a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryActivity.ps1 +++ b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryActivity.ps1 @@ -68,7 +68,7 @@ # The number of results per page (max 100). # Default: 30 [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. diff --git a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryContributor.ps1 b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryContributor.ps1 index f53890571..add2f3adc 100644 --- a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryContributor.ps1 +++ b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryContributor.ps1 @@ -37,7 +37,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryFork.ps1 b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryFork.ps1 index 23279fc2e..10d39aea5 100644 --- a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryFork.ps1 +++ b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryFork.ps1 @@ -33,7 +33,7 @@ # The number of results per page. [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTag.ps1 b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTag.ps1 index b8cf17886..b8a082631 100644 --- a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTag.ps1 +++ b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTag.ps1 @@ -29,7 +29,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTeam.ps1 b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTeam.ps1 index 32275b33a..0f8a90836 100644 --- a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTeam.ps1 +++ b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTeam.ps1 @@ -37,7 +37,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTopic.ps1 b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTopic.ps1 index 9c95fe224..81caa1d5c 100644 --- a/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTopic.ps1 +++ b/src/functions/public/Repositories/Repositories/Get-GitHubRepositoryTopic.ps1 @@ -25,7 +25,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/public/Repositories/RuleSuite/Get-GitHubRepositoryRuleSuite.ps1 b/src/functions/public/Repositories/RuleSuite/Get-GitHubRepositoryRuleSuite.ps1 index e5c00d80b..6222f9ae5 100644 --- a/src/functions/public/Repositories/RuleSuite/Get-GitHubRepositoryRuleSuite.ps1 +++ b/src/functions/public/Repositories/RuleSuite/Get-GitHubRepositoryRuleSuite.ps1 @@ -66,7 +66,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [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. diff --git a/src/functions/public/Repositories/RuleSuite/Get-GitHubRepositoryRuleSuiteList.ps1 b/src/functions/public/Repositories/RuleSuite/Get-GitHubRepositoryRuleSuiteList.ps1 index 5a7483303..70f28673e 100644 --- a/src/functions/public/Repositories/RuleSuite/Get-GitHubRepositoryRuleSuiteList.ps1 +++ b/src/functions/public/Repositories/RuleSuite/Get-GitHubRepositoryRuleSuiteList.ps1 @@ -60,7 +60,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/public/Users/Blocking/Get-GitHubBlockedUser.ps1 b/src/functions/public/Users/Blocking/Get-GitHubBlockedUser.ps1 index d0f4cde44..d9bb76988 100644 --- a/src/functions/public/Users/Blocking/Get-GitHubBlockedUser.ps1 +++ b/src/functions/public/Users/Blocking/Get-GitHubBlockedUser.ps1 @@ -35,7 +35,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/public/Users/Blocking/Test-GitHubBlockedUser.ps1 b/src/functions/public/Users/Blocking/Test-GitHubBlockedUser.ps1 index 37362fd7e..466f2d029 100644 --- a/src/functions/public/Users/Blocking/Test-GitHubBlockedUser.ps1 +++ b/src/functions/public/Users/Blocking/Test-GitHubBlockedUser.ps1 @@ -47,7 +47,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/public/Users/Emails/Get-GitHubUserEmail.ps1 b/src/functions/public/Users/Emails/Get-GitHubUserEmail.ps1 index 4d32fc269..4d80654ec 100644 --- a/src/functions/public/Users/Emails/Get-GitHubUserEmail.ps1 +++ b/src/functions/public/Users/Emails/Get-GitHubUserEmail.ps1 @@ -29,7 +29,7 @@ param( # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, [Parameter()] diff --git a/src/functions/public/Users/Followers/Get-GitHubUserFollower.ps1 b/src/functions/public/Users/Followers/Get-GitHubUserFollower.ps1 index 133ed8ab1..fd880a302 100644 --- a/src/functions/public/Users/Followers/Get-GitHubUserFollower.ps1 +++ b/src/functions/public/Users/Followers/Get-GitHubUserFollower.ps1 @@ -33,7 +33,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/public/Users/Followers/Get-GitHubUserFollowing.ps1 b/src/functions/public/Users/Followers/Get-GitHubUserFollowing.ps1 index 02d6e5860..9a60fc648 100644 --- a/src/functions/public/Users/Followers/Get-GitHubUserFollowing.ps1 +++ b/src/functions/public/Users/Followers/Get-GitHubUserFollowing.ps1 @@ -34,7 +34,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/public/Users/GPG-Keys/Get-GitHubUserGpgKey.ps1 b/src/functions/public/Users/GPG-Keys/Get-GitHubUserGpgKey.ps1 index 7fe277e44..039e82d3c 100644 --- a/src/functions/public/Users/GPG-Keys/Get-GitHubUserGpgKey.ps1 +++ b/src/functions/public/Users/GPG-Keys/Get-GitHubUserGpgKey.ps1 @@ -46,7 +46,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/public/Users/Get-GitHubUser.ps1 b/src/functions/public/Users/Get-GitHubUser.ps1 index f86cef118..94115fcd0 100644 --- a/src/functions/public/Users/Get-GitHubUser.ps1 +++ b/src/functions/public/Users/Get-GitHubUser.ps1 @@ -55,7 +55,7 @@ # The number of results per page (max 100). [Parameter(ParameterSetName = 'AllUsers')] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. diff --git a/src/functions/public/Users/Keys/Get-GitHubUserKey.ps1 b/src/functions/public/Users/Keys/Get-GitHubUserKey.ps1 index b13fa0136..5605ec715 100644 --- a/src/functions/public/Users/Keys/Get-GitHubUserKey.ps1 +++ b/src/functions/public/Users/Keys/Get-GitHubUserKey.ps1 @@ -49,7 +49,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. 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 1c6927c26..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,7 +49,7 @@ # The number of results per page (max 100). [Parameter()] - [ValidateRange(1, 100)] + [ValidateRange(0, 100)] [int] $PerPage, # The context to run the command in. Used to get the details for the API call. From 57fc3d57c12878b5671569e28011b30d4d769893 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 15 Dec 2024 00:54:13 +0100 Subject: [PATCH 6/7] Update per_page handling to set default from context when value is zero --- src/functions/public/API/Invoke-GitHubAPI.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/functions/public/API/Invoke-GitHubAPI.ps1 b/src/functions/public/API/Invoke-GitHubAPI.ps1 index 09321916d..e8c8a918f 100644 --- a/src/functions/public/API/Invoke-GitHubAPI.ps1 +++ b/src/functions/public/API/Invoke-GitHubAPI.ps1 @@ -151,7 +151,7 @@ # 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.ContainsKey('per_page') -and $null -eq $Body['per_page']) { + if ($Body['per_page'] -eq 0) { $Body['per_page'] = $Context.PerPage } $queryString = $Body | ConvertTo-QueryString From a215f848c3473c3cd6761c1a72733ad58478100d Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 15 Dec 2024 01:09:41 +0100 Subject: [PATCH 7/7] Add debug message for setting default per_page value from context --- src/functions/public/API/Invoke-GitHubAPI.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/functions/public/API/Invoke-GitHubAPI.ps1 b/src/functions/public/API/Invoke-GitHubAPI.ps1 index e8c8a918f..1c71f940c 100644 --- a/src/functions/public/API/Invoke-GitHubAPI.ps1 +++ b/src/functions/public/API/Invoke-GitHubAPI.ps1 @@ -152,6 +152,7 @@ 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