From ce140460af99ad73da3136f7a9343f61e5f2129b Mon Sep 17 00:00:00 2001 From: Marcin Zajaczkowski Date: Mon, 4 Apr 2016 17:30:48 +0200 Subject: [PATCH] [#269] Add reopen method on GHMilestone --- src/main/java/org/kohsuke/github/GHMilestone.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/kohsuke/github/GHMilestone.java b/src/main/java/org/kohsuke/github/GHMilestone.java index 0d1b43224e..48f8364bbf 100644 --- a/src/main/java/org/kohsuke/github/GHMilestone.java +++ b/src/main/java/org/kohsuke/github/GHMilestone.java @@ -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()); }