go-github: IssuesService.Edit cannot clear an issue's milestone
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 uses omitempty
.
Not sure what the right solution would be, perhaps a standalone method for clearing milestones?
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 2
- Comments: 15 (12 by maintainers)
Commits related to this issue
- mungebot: Enable clearing an issue's milestone Explicit support for clearing the milestone of an issue is required due to go-github's use of omitempty (precluding the use of null) in the json field d... — committed to marun/test-infra by marun 7 years ago
- mungebot: Enable clearing an issue's milestone Explicit support for clearing the milestone of an issue is required due to go-github's use of omitempty (precluding the use of null) in the json field d... — committed to marun/test-infra by marun 7 years ago
- Add new RemoveMilestone method on IssuesService (#2195) Fixes: #236. — committed to google/go-github by AGMETEOR 3 years ago
Hi @gmlewis, i would like to this work on this issue. Thanks
Indeed, we can workaround it like that (tested) :
Hi @AGMETEOR, you can take this up. apologies for not being able to respond
Hi @gmlewis , I would like to pick this one up in case @sagar23sj is ok with that 😃
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.