-
Notifications
You must be signed in to change notification settings - Fork 731
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
y.kokubo
committed
Jan 13, 2012
1 parent
44f1038
commit fbcf3a1
Showing
3 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
package org.kohsuke.github; | ||
|
||
import java.util.Date; | ||
|
||
/** | ||
* | ||
* @author Yusuke Kokubo | ||
* | ||
*/ | ||
public class GHMilestone { | ||
GitHub root; | ||
GHRepository owner; | ||
|
||
GHUser creator; | ||
private String state, due_on, title, url, created_at, description; | ||
private int closed_issues, open_issues, number; | ||
|
||
public GitHub getRoot() { | ||
return root; | ||
} | ||
|
||
public GHRepository getOwner() { | ||
return owner; | ||
} | ||
|
||
public GHUser getCreator() { | ||
return creator; | ||
} | ||
|
||
public Date getDueOn() { | ||
if (due_on == null) return null; | ||
return GitHub.parseDate(due_on); | ||
} | ||
|
||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
public String getUrl() { | ||
return url; | ||
} | ||
|
||
public Date getCreatedAt() { | ||
return GitHub.parseDate(created_at); | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public int getClosedIssues() { | ||
return closed_issues; | ||
} | ||
|
||
public int getOpenIssues() { | ||
return open_issues; | ||
} | ||
|
||
public int getNumber() { | ||
return number; | ||
} | ||
|
||
public GHMilestoneState getState() { | ||
return Enum.valueOf(GHMilestoneState.class, state); | ||
} | ||
|
||
public GHMilestone wrap(GHRepository repo) { | ||
this.owner = repo; | ||
this.root = repo.root; | ||
return this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.kohsuke.github; | ||
|
||
/** | ||
* | ||
* @author Yusuke Kokubo | ||
* | ||
*/ | ||
public enum GHMilestoneState { | ||
open, | ||
closed | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters