Skip to content

Milestones can not be unset #444

@Arrow768

Description

@Arrow768

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions