Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCopying branch protection from one branch to another #1593
Comments
|
To debug things like this, I usually try to make a working example with curl and then convert it to the Go equivalent. Is that easy to do in this case? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello! I'm attempting to copy a
*github.Protectionfrom one branch to another. This involves turning the existing*github.Protectioninto a*github.ProtectionRequestto use in theUpdateBranchProtection()method. Is there a recommended way to do this?I have a monster of a function that tries to convert an existing
Protectioninto aProtectionRequest, but there's lots of nested requests needed, and any nil fromProtectionthat's copied over throws an error.