Skip to content

Commit

Permalink
Merge pull request #270 from szpak/issue/269-reopenMilestone
Browse files Browse the repository at this point in the history
[#269] Add reopen method on GHMilestone
  • Loading branch information
kohsuke committed Apr 13, 2016
2 parents 6b5ade3 + ce14046 commit b750707
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 b750707

Please sign in to comment.