🩹 [Patch]: Class enrichments for GitHubContexts
#197
Merged
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 context and API handling in the PowerShell scripts. The changes include adding new properties to context classes, improving the handling of API responses, and adding options for GitHub App authentication.
Enhancements to GitHub context classes:
src/classes/public/Context/GitHubContext.ps1: AddedDisplayNameproperty to theGitHubContextclass.src/classes/public/Context/GitHubContext/AppGitHubContext.ps1: AddedOwner,OwnerType,Permissions, andEventsproperties to theAppGitHubContextclass.src/classes/public/Context/GitHubContext/InstallationGitHubContext.ps1: AddedPermissions,Events,TargetType, andTargetNameproperties to theInstallationGitHubContextclass.Improvements to API handling:
src/functions/public/API/Invoke-GitHubAPI.ps1: Simplified content type handling by using a regex pattern and added a check for empty response content. [1] [2]Enhancements to GitHub App authentication:
src/functions/public/Auth/Connect-GitHubAccount.ps1: AddedSkipAppAutoloadparameter and logic to load GitHub App contexts. [1] [2]src/functions/public/Auth/Connect-GitHubApp.ps1: AddedPermissions,Events,TargetType, andTargetNameproperties to the context parameters.Other changes:
src/functions/public/Auth/Context/Set-GitHubContext.ps1: AddedDisplayName,Permissions,Events,Owner, andOwnerTypeproperties to the context. [1] [2]src/functions/public/Auth/Get-GitHubViewer.ps1: Includednamein the default fields to return.Type of change
Checklist