Skip to content

Commit 0e6d08f

Browse files
committed
Add GHPullRequestReview.submitted_at field
1 parent fad203a commit 0e6d08f

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

src/main/java/org/kohsuke/github/GHPullRequestReview.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
2727

28+
import java.util.Date;
2829
import javax.annotation.CheckForNull;
2930
import java.io.IOException;
3031
import java.net.URL;
@@ -43,6 +44,7 @@ public class GHPullRequestReview extends GHObject {
4344
private GHUser user;
4445
private String commit_id;
4546
private GHPullRequestReviewState state;
47+
private String submitted_at;
4648

4749
/*package*/ GHPullRequestReview wrapUp(GHPullRequest owner) {
4850
this.owner = owner;
@@ -88,6 +90,21 @@ protected String getApiRoute() {
8890
return owner.getApiRoute()+"/reviews/"+id;
8991
}
9092

93+
/**
94+
* When was this resource created?
95+
*/
96+
public Date getSubmittedAt() throws IOException {
97+
return GitHub.parseDate(submitted_at);
98+
}
99+
100+
/**
101+
* Since this method does not exist, we forward this value.
102+
*/
103+
@Override
104+
public Date getCreatedAt() throws IOException {
105+
return getSubmittedAt();
106+
}
107+
91108
/**
92109
* @deprecated
93110
* Former preview method that changed when it got public. Left here for backward compatibility.

0 commit comments

Comments
 (0)