-
Notifications
You must be signed in to change notification settings - Fork 769
Closed
Labels
Description
It is not possible to unset milestones.
To unset a PATCH with null for the milestone value needs to be sent.
However that is not possible due to two problems:
- public void setMilestone(GHMilestone milestone) throws a null pointer exception if null is passed.
A check like that solves this problem:
public void setMilestone(GHMilestone milestone) throws IOException {
if(milestone != null){
editIssue("milestone",milestone.getNumber());
} else {
editIssue("milestone",null);
}
}
- This leads to the second problem. The editIssue method calls the method _with on the Requester which only adds arguments if the value of that argument is not null.
I solved this problem by having a editIssueNullable that calls withNullable instead of _with, but I am not sure if that is a good way to solve that problem.