🩹 [Patch]: Update environment functions documentation and remove unused environment class #323
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 includes significant changes to the handling of GitHub environments in the PowerShell module. The most important changes involve the removal of the
Environment
class and its related classes, updates to the example outputs in several functions, and some adjustments to the function signatures.Removal of Classes:
src/classes/public/Environment/GitHubEnvironment.ps1
: Removed theEnvironment
,RequiredReviewers
,BranchPolicy
, andDeploymentBranchPolicy
classes, which were used to model GitHub environment data.Updates to Example Outputs:
src/functions/private/Environments/Get-GitHubEnvironmentByName.ps1
: Updated the example output to reflect the new format of environment details, including additional fields likeid
,node_id
, andprotection_rules
.src/functions/private/Environments/Get-GitHubEnvironmentList.ps1
: Updated the example output to show the new format for listing environments, including fields likeid
,node_id
,protection_rules
, anddeployment_branch_policy
.src/functions/public/Environments/Get-GitHubEnvironment.ps1
: Updated the example output to reflect the new format of environment details, similar to the changes made inGet-GitHubEnvironmentByName
.Function Signature Adjustments:
src/functions/public/Environments/Remove-GitHubEnvironment.ps1
: Changed the output type of theRemove-GitHubEnvironment
function fromPSCustomObject
tovoid
, indicating that it no longer returns an object.src/functions/public/Environments/Set-GitHubEnvironment.ps1
: Modified the example to use a hashtable for parameters, demonstrating a more complex usage scenario with additional fields likeReviewers
andDeploymentBranchPolicy
.Type of change
Checklist