Skip to content
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

Milestones can not be unset #444

Closed
Arrow768 opened this issue Jul 3, 2018 · 0 comments · Fixed by #773
Closed

Milestones can not be unset #444

Arrow768 opened this issue Jul 3, 2018 · 0 comments · Fixed by #773
Labels

Comments

@Arrow768
Copy link
Contributor

Arrow768 commented Jul 3, 2018

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 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants