-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API Coverage: Add Support for Deployment Environments #395
API Coverage: Add Support for Deployment Environments #395
Conversation
@HowardWolosky, this PR is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this addition. Overall this looks solid, but I do have some minor updates for you to consider.
Interesting how for this newer API, GitHub has aligned both the New
and Update
to be backed by the same REST API. I wonder if that will continue to be the case in the future....?
GitHubDeployments.ps1
Outdated
{ | ||
<# | ||
.SYNOPSIS | ||
Creates a new deployment environment on a GitHub repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that you are aliasing this as both New
and Set
, you may need to update the documentation language to match (e.g. "Creates a new (or updates an existing) ...") (or use the API docs method of "Creates or updates an ..."). Here and elsewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
GitHubDeployments.ps1
Outdated
[ValidateSet('ProtectedBranches', 'CustomBranchPolicies', 'None')] | ||
[string] $DeploymentBranchPolicy, | ||
|
||
[array] $ReviewerTeamId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a situation where the module is providing the user back an object where the Team or User ID is a string? (Legitimate question here). If not, it might make more sense to be explicit with the type expectations here as [int32[]]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed the types to int64[]
to match what is specified in the GitHubRepositories
and GutHubTeams
functions.
GitHubDeployments.ps1
Outdated
[Parameter( | ||
ValueFromPipelineByPropertyName, | ||
ParameterSetName='Organization')] | ||
[string] $OrganizationName, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this supposed to be here?
[Parameter( | |
ValueFromPipelineByPropertyName, | |
ParameterSetName='Organization')] | |
[string] $OrganizationName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, removed.
Co-authored-by: Howard Wolosky <HowardWolosky@users.noreply.github.com>
@HowardWolosky, any timescale on when you will be able to re-review this PR? |
@HowardWolosky, any update on the review for this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks good now except for a few minor nits (three formatting and one typo) which I've added as suggestions so that I can just apply the fixes myself without inconveniencing you further.
/azp run PowerShellForGitHub-CI |
Azure Pipelines successfully started running 1 pipeline(s). |
Description
This PR adds the following new cmdlets for managing GitHub Deployment Environments:
New-GitHubDeploymentEnvironment
Get-GitHubDeploymentEnvironment
Set-GitHubDeploymentEnvironment
Remove-GitHubDeploymentEnvironment
Issues Fixed
References
Checklist