Skip to content

Commit

Permalink
Update PerPage parameter validation to allow zero
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusStorhaug committed Dec 14, 2024
1 parent 1241c2d commit 429970f
Show file tree
Hide file tree
Showing 50 changed files with 50 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/functions/private/Users/Get-GitHubAllUser.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/functions/private/Users/Keys/Get-GitHubUserMyKey.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/functions/public/Actions/Get-GitHubWorkflow.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/functions/public/Actions/Get-GitHubWorkflowRun.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/functions/public/Users/Emails/Get-GitHubUserEmail.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
param(
# The number of results per page (max 100).
[Parameter()]
[ValidateRange(1, 100)]
[ValidateRange(0, 100)]
[int] $PerPage,

[Parameter()]
Expand Down
Loading

0 comments on commit 429970f

Please sign in to comment.