feat: centralize GitHub API requests with auth and retry logic#528
Merged
jaredfholgate merged 2 commits intomainfrom Mar 25, 2026
Merged
feat: centralize GitHub API requests with auth and retry logic#528jaredfholgate merged 2 commits intomainfrom
jaredfholgate merged 2 commits intomainfrom
Conversation
- Add Invoke-GitHubApiRequest function that centralizes all GitHub API calls with automatic gh CLI authentication and configurable retry logic for transient errors (408, 429, 5xx). - Update Get-GithubRelease, Get-GithubReleaseTag, Get-HCLParserTool, and Test-NetworkConnectivity to use the new centralized function. - Add github_max_retry_count parameter to Deploy-Accelerator to allow configuring max retries for GitHub API calls. - Propagate maxRetryCount through New-ModuleSetup and New-FolderStructure. - Fix variable name references (isFirstRun -> firstRun) in New-ModuleSetup.
jtracey93
previously approved these changes
Mar 25, 2026
jtracey93
approved these changes
Mar 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Introduces a centralized
Invoke-GitHubApiRequestfunction that consolidates all GitHub API calls with:gh auth token) when available, increasing API rate limitsChanges
New Function
Invoke-GitHubApiRequest— Central function for all GitHub HTTP requests with auth header injection and retry supportUpdated Functions
Get-GithubRelease— UsesInvoke-GitHubApiRequestinstead ofInvoke-WebRequestfor downloading release artifactsGet-GithubReleaseTag— UsesInvoke-GitHubApiRequestinstead ofInvoke-RestMethodwith inline retry logic removedGet-HCLParserTool— UsesInvoke-GitHubApiRequestfor downloading HCL parser binariesTest-NetworkConnectivity— Routesapi.github.comconnectivity check throughInvoke-GitHubApiRequestNew-ModuleSetup— PropagatesmaxRetryCountparameter; fixesisFirstRun→firstRunvariable referencesNew-FolderStructure— Accepts and passes throughmaxRetryCountparameterDeploy-Accelerator— Addsgithub_max_retry_countparameter (alias:gmrc,githubMaxRetryCount)Tests
Test-NetworkConnectivity.Tests.ps1to mockInvoke-GitHubApiRequestfor the GitHub API endpoint