-
Notifications
You must be signed in to change notification settings - Fork 2.1k
IssuesService.Edit cannot clear an issue's milestone #236
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
Comments
Is there a workaround for this ? |
The workaround is to send the request manually. You can basically copy |
Indeed, we can workaround it like that (tested) : u := fmt.Sprintf("repos/%v/%v/issues/%d", owner, repo, issue)
req, err := githubCli.NewRequest("PATCH", u, &struct {
Milestone interface{} `json:"milestone"`
}{})
if err != nil {
return err
}
_, err = githubCli.Do(req, nil)
if err != nil {
return err
} |
I'm surprised this hasn't been addressed in 2 years, though it's clear it's a problem as @marun has mentioned above. Should we add a Dropping |
I think that's the case because the GitHub API is very large, and removing a milestone from an issue is something only a few people ever need. It has a well described workaround here, so those who need it use that and move on. To resolve the issue, we need to come up with a good API/good way of doing so. |
Nice to see @elliott-beach again - this issue manifests as a bug with much head scratching and wasted time. Perhaps now that there are multiple consumers with this specific issue, we could fix this issue using this library. What are your thoughts 3 years on? Alex |
It seems to me to be a relatively simple matter to resolve this issue by creating a new Leaving this issue open. This would be a great PR for any new contributor to this repo or a new Go developer. Feel free to volunteer for any issue and the issue can be assigned to you so that others don't attempt to duplicate the work. Please check out our CONTRIBUTING.md guide to get started. (In particular, please remember to Thank you! |
Hi @gmlewis, i would like to this work on this issue. |
Thank you, @sagar23sj, it is yours. |
Hi @sagar23sj , in case you're busy I would like to take this off your plate :) |
Hi @gmlewis , I would like to pick this one up in case @sagar23sj is ok with that :) |
Thank you, @AGMETEOR - since we haven't heard back from @sagar23sj , I'll assign it to you. |
Hi @AGMETEOR, you can take this up. |
Thanks @sagar23sj for letting me take this up. I'll start work on it over the weekend when I get some personal time. |
Still on it... |
Much like #181 I fail to see how to use go-github to clear an issue's milestone. The API requires the milestone be to set to
null
in the request so that it is cleared, but that is not possible since the field usesomitempty
.Not sure what the right solution would be, perhaps a standalone method for clearing milestones?
The text was updated successfully, but these errors were encountered: