Skip to content

Commit

Permalink
[#269] Add reopen method on GHMilestone
Browse files Browse the repository at this point in the history
  • Loading branch information
szpak committed Apr 4, 2016
1 parent d30b040 commit ce14046
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/org/kohsuke/github/GHMilestone.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,19 @@ public GHMilestoneState getState() {
}

/**
* Closes this issue.
* Closes this milestone.
*/
public void close() throws IOException {
edit("state", "closed");
}

/**
* Reopens this milestone.
*/
public void reopen() throws IOException {
edit("state", "open");
}

private void edit(String key, Object value) throws IOException {
new Requester(root)._with(key, value).method("PATCH").to(getApiRoute());
}
Expand Down

0 comments on commit ce14046

Please sign in to comment.