I am currently looking through the source and cannot find a way to do this through the go-github API. Therefore we are resorting to a CLI solution.
Are there any plans on thoughts on deleting remote branches via the API?
Can you please provide a link in the GitHub API docs showing how to delete remote branches?
Looking at https://developer.github.com/v3/repos/branches/ I'm coming up empty, but I could certainly be missing something.
@awitherow take a look at the API doc, there's an example using the API for just this use case: https://developer.github.com/v3/git/refs/#delete-a-reference
@nicolai86 is right, as far as I can tell.
https://godoc.org/github.com/google/go-github/github#GitService.DeleteRef is what you're looking for.
This has worked for the usecase intended! @shurcooL @gmlewis thoughts on extending/updating documentation to best direct questions such as these or will this issue suffice?
I don't think we need to do anything here. go-github maps nearly 1:1 to the GitHub API, and this is what GitHub API offers. If there's something confusing in the GitHub API, the issue needs to be fixed on their end.
From what I've seen so far, this question doesn't come up very often, so perhaps it's not a very common source of confusion at this time. We can keep an eye on it and act if it continues to come up.