-
Notifications
You must be signed in to change notification settings - Fork 188
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
GitHubBranches: Add New/Remove-GitHubRepositoryBranch Functions #200
Conversation
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.
It seems like there's some strong overlap between this and @raghav710's #97. I think that needs to be resolved first. Let me check on #97 in it's thread.
Can we trigger the CI for this PR? |
/azp run PowerShellForGitHub-CI |
Azure Pipelines successfully started running 1 pipeline(s). |
The Context When the origin branch cannot be found tests are failing because I'm getting very different error objects back between PowerShell 5 and 7 when calling Adding some debug code, I can see that in PowerShell 5,
and in PowerShell 7
Adding
I think |
I've opened #223 to track that problem. |
Can we trigger the CI for this PR? |
I've added the |
I've added temporary code to the |
Can we trigger the CI for this PR? |
/azp run PowerShellForGitHub-CI |
Azure Pipelines successfully started running 1 pipeline(s). |
Great to have a fast CI now! This PR is ready for final review. |
Thanks for the encouragement/push to do the extra work to make the additional accounts to allow for the parallel processing!
Will get to the review this weekend or early next week. Thanks again for all your work here! |
Hi @HowardWolosky, I've added pipeline support to these new functions. Can we trigger the CI for this PR? |
/azp run PowerShellForGitHub-CI |
Azure Pipelines successfully started running 1 pipeline(s). |
Can we trigger the CI 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.
Finally had time to review this one in context to #97.
I think both PR's have a place in the module, but it would make sense for these two functions to be built on-top of New-GitHubReference
/Remove-GitHubReference
once that goes in.
sha = $originBranch.commit.sha | ||
} | ||
|
||
$params = @{ |
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 think it probably makes more sense to allow #97 to go in, and then have this function be a wrapper on top of New-GitHubReference
. You can still make this an intelligent helper that can automate retrieving the sha
via an internal call to Get-GitHubRepositoryBranch
when it hasn't been passed in manually or via the pipeline, but given that we'll want New-GitHubReference
in the module anyway to be able to support tag references, it seems like it makes more sense to not duplicate the logic of forming a call to create new references across two functions. Same for Remove-*
.
- Add New-GitHubRepositoryBranch and Remove-GitHubRepositoryBranch
- Add CBH Inputs - Fix CBH Outputs - Add PositionalBinding - Change Mandatory parameter order - Add Invocation parm to Write-InvocationLog - Fix getGitHubRepositoryBranchParms - Add temp code to handle diffs in exception object between PS5 & PS7 - Add ShouldProcess to Remove-GitHubRepositoryBranch
This PR is superseded by PR #256 |
Description
This PR adds the following functions to the
GitHubBranches
module:New-GitHubRepositoryBranch
Remove-GitHubRepositoryBranch
Issues Fixed
None
References
GitHub Repos API
Checklist
If desired, ensure your name is added to our Contributors list