Skip to content

Commit

Permalink
Update per_page handling to set default from context when value is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusStorhaug committed Dec 14, 2024
1 parent 429970f commit 57fc3d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/functions/public/API/Invoke-GitHubAPI.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 57fc3d5

Please sign in to comment.