🩹 [Patch]: Source all defaults for Context via Config
#285
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.
Description
This pull request introduces several enhancements to the GitHub PowerShell module, focusing on default configuration values, context handling, and testing improvements. Default values have been added for GitHub API and HTTP protocol versions, updating context handling to use these default values, and enhancing the test suite to verify the new configurations.
Context#282Enhancements to default configuration values
src/classes/public/Config/GitHubConfig.ps1: Added default values forApiVersion,HttpVersion, andPerPageparameters.src/variables/private/GitHub.ps1: Set default values forApiVersion,HttpVersion, andPerPagein the configuration.Updates to context handling:
src/classes/public/Context/GitHubContext.ps1: Included default values forHttpVersionandPerPage.src/functions/public/API/Invoke-GitHubAPI.ps1: Modified to utilize the context'sHttpVersionandApiVersionvalues. [1] [2]src/functions/public/Auth/Connect-GitHubAccount.ps1: Updated to set context propertiesHttpVersion,PerPage, andApiVersionfrom the configuration. [1] [2]Enhancements to the test suite:
tests/GitHub.Tests.ps1: Improved tests to verify the new default configuration values and context settings. [1] [2]Type of change
Checklist