-
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
GitHubBranches: Add Get/New/Remove GitHub Repository Branch Pattern Protection Rule #313
GitHubBranches: Add Get/New/Remove GitHub Repository Branch Pattern Protection Rule #313
Conversation
Thanks for this submission, @X-Guardian! I'm really excited to start looking at the code this weekend, as I had wanted to try out the Graph API's but have yet to have a chance. |
Just a quick update -- I've been slammed with my regular work so I've been delayed with getting this a code review. I'm hoping to have a first-pass review done by the end of this coming weekend if not sooner. I do appreciate your patience here. I'm really looking forward to reading through this code. |
Just an update here...I'm about halfway through the code review. Only minor issues have been found so far. Hoping to find more time during the week this week to complete it. Thanks again for your patience, and more importantly, for tackling this task! |
Hi @HowardWolosky, any idea when you might be able to finish the code review on this? |
@X-Guardian - My sincere apologies here. Life and my main work have kept me attending to this. I'm setting aside actual time this week to work through the remainder of the PR. Again, sincere apologies here as you've clearly put a lot of work into this change, and it's setting up the project for future desired features. The time to review this PR does not at all reflect what I'd prefer the average review time to be. |
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.
Phew. Finally managed to get through the whole thing.
Major kudos to you for adding in GraphQl support...that's no easy feat. Even after reviewing all of this code and double-checking it with the documentation, I find GraphQL much less straightforward than the REST API.
Overall, I thought that you did a fantastic job with this. There are a smatter of formatting nits in this feedback, along with a variety of smaller and larger architectural feedback items. I can promise a quicker turnaround on subsequent PR updates, especially now that I got through this first round.
Thanks again for this contribution. It really is valued and appreciated.
/azp run PowerShellForGitHub-CI |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run PowerShellForGitHub-CI |
/azp run PowerShellForGitHub-CI |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run PowerShellForGitHub-CI |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run PowerShellForGitHub-CI |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run PowerShellForGitHub-CI |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
All tests now passing. Good to go.
Just curious, is there a reason this didn't use the octokit v4 API? |
Good question. In truth, I was unaware of it. However, looking at it, I'm not sure the trades-offs would have been worth it:
I could probably list more as well. As an aside, while many PowerShell modules themselves are written in .NET and simply expose PowerShell cmdlets to access that .NET-implemented functionality, this module is currently strictly written in PowerShell. So far, that has worked well for us. I appreciate the heads-up though. It certainly does seem worthwhile to keep an open-mind on this going forward. But, like I said, I don't think using that API really buys us a lot relative to what we'd lose. |
Oh don't get me wrong, I was just curious what the decision criteria was, your graphql implementation is great quality! |
Those kudos land squarely on the shoulders of @X-Guardian. |
Hi @HowardWolosky, it is now coming up to a year since this PR was merged, and there has been no new PowerShellForGitHub releases since then. What is the status of getting a new release? I would like to make additional contributions to this module, but don't see any point if they never get released. |
I realize that the delay has been frustrating -- it's been frustrating for me as well. I'm still navigating internal issues with getting the necessary steps in plan to be able to re-enable signing. That's what all the delays come down to. I can't release further updates under the I will post updates as I have them, and I'm optimistic that I'll be able to make further progress to get signing re-enabled. |
Good news! I believe I have a workaround for my signing issues and will be able to release a signed version of 0.16.1 next week. That workaround should also allow me to continue to release signed versions going forward as well, although it will have to be done manually as opposed to through the Release pipeline. |
|
Description
This PR adds the following functions to the
GitHubBranches
module:Invoke-GHGraphQl
Get-GitHubRepositoryBranchPatternProtectionRule
New-GitHubRepositoryBranchPatternProtectionRule
Remove-GitHubRepositoryBranchPatternProtectionRule
Invoke-GHGraphQl
is based onInvoke-GHRestMethod
but modified with the following features:Invoke-WebRequest
error handling support.ThrowTerminatingError
instead ofThrow
for enhanced exceptions and hiding the internal details of the function. Reference: Everything you wanted to know about exceptionsIssues Fixed
References
Checklist