🩹 [Patch]: Rename $inputObject
variables to $apiParams
in API calls
#464
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR improves code clarity by renaming misleading variable names in API parameter hashtables throughout the codebase.
$inputObject
variables to$apiParams
in API calls #433Problem
Previously, the variable
$inputObject
was used to represent hashtables containing parameters for API requests. However,$inputObject
typically implies pipeline input rather than API request parameters, making it confusing and misleading for developers maintaining the code.Example of confusing usage:
Solution
Renamed all occurrences of
$inputObject
used specifically for API request parameter hashtables to$apiParams
for clarity and better readability.After the change:
Changes Made
Invoke-GitHubAPI @inputObject
→Invoke-GitHubAPI @apiParams
Invoke-GitHubGraphQLQuery @inputObject
→Invoke-GitHubGraphQLQuery @apiParams
Scope
✅ Changed: All occurrences where
$inputObject
explicitly represents parameters passed toInvoke-GitHubAPI
orInvoke-GitHubGraphQLQuery
✅ Preserved: Parameters named
$InputObject
intended for pipeline input objects (such as[Parameter(ValueFromPipeline)]
)Validation
[GitHubVariable[]] $InputObject
inRemove-GitHubVariable
)$inputObject
variables used with API callsOutcome
Improved code clarity and maintainability, reducing potential confusion for future development and maintenance by clearly distinguishing API parameter hashtables from pipeline input parameters.