Commit 12288bd
This PR improves code clarity by renaming misleading variable names in
API parameter hashtables throughout the codebase.
- Fixes #433
## Problem
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:**
```powershell
$inputObject = @{
Method = 'DELETE'
APIEndpoint = "/orgs/$Name"
Context = $Context
}
Invoke-GitHubAPI @InputObject
```
## Solution
Renamed all occurrences of `$inputObject` used specifically for API
request parameter hashtables to `$apiParams` for clarity and better
readability.
**After the change:**
```powershell
$apiParams = @{
Method = 'DELETE'
APIEndpoint = "/orgs/$Name"
Context = $Context
}
Invoke-GitHubAPI @apiParams
```
## Changes Made
- **Files Modified:** 211 files total
- **REST API calls:** 202 files with `Invoke-GitHubAPI @inputObject` →
`Invoke-GitHubAPI @apiParams`
- **GraphQL calls:** 9 files with `Invoke-GitHubGraphQLQuery
@inputObject` → `Invoke-GitHubGraphQLQuery @apiParams`
- **Lines Changed:** 595 insertions, 595 deletions (pure variable
renaming)
## Scope
✅ **Changed**: All occurrences where `$inputObject` explicitly
represents parameters passed to `Invoke-GitHubAPI` or
`Invoke-GitHubGraphQLQuery`
✅ **Preserved**: Parameters named `$InputObject` intended for pipeline
input objects (such as `[Parameter(ValueFromPipeline)]`)
## Validation
- All PowerShell syntax validation passes
- Pipeline parameters correctly preserved (e.g., `[GitHubVariable[]]
$InputObject` in `Remove-GitHubVariable`)
- Zero remaining `$inputObject` variables used with API calls
- No functional changes - pure variable renaming
## Outcome
Improved code clarity and maintainability, reducing potential confusion
for future development and maintenance by clearly distinguishing API
parameter hashtables from pipeline input parameters.
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: MariusStorhaug <[email protected]>
Co-authored-by: Marius Storhaug <[email protected]>
1 parent c593843 commit 12288bd
File tree
215 files changed
+461
-461
lines changed- examples
- Organizations
- Repositories
- src
- classes/public/App
- functions
- private
- Actions/Workflow Run
- Apps/GitHub Apps
- Artifacts
- Branches
- Environments
- Gitignore
- License
- Organization
- Blocking
- Releases
- Assets
- Repositories
- Autolinks
- RuleSuite
- Secrets
- PublicKey
- Teams
- Users
- Blocking
- Emails
- Followers
- GPG-Keys
- Keys
- SSH-Signing-Keys
- Social-Accounts
- Variables
- Webhooks
- public
- API
- Apps
- GitHub App Installations
- GitHub App
- Artifacts
- Emojis
- Environments
- Markdown
- Meta
- Organization
- Members
- Rate-Limit
- Releases
- Assets
- Repositories
- Autolinks
- CustomProperties
- Permissions
- Repositories
- Secrets/SelectedRepository
- Teams
- Users
- Emails
- Followers
- GPG-Keys
- Keys
- SSH-Signing-Keys
- Social-Accounts
- Variables/SelectedRepository
- Webhooks
- Workflows
- Runs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
215 files changed
+461
-461
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
0 commit comments