Skip to content

Commit

Permalink
Add commitId to Review object
Browse files Browse the repository at this point in the history
Allows identifying outdated reviews by comparing review commit ID with PR head
revision.
  • Loading branch information
deiwin committed May 7, 2018
1 parent a84d222 commit 7fa0d37
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ Name | Type | Setter | Description
id | `long` | false
user | `String` | false
body | `String` | false
commitId | `String` | false
state | `String` | One of APPROVED, PENDING, CHANGES_REQUESTED, DISMISSED, COMMENTED

### Methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ public String getBody() {
return review.getBody();
}

@Whitelisted
public String getCommitId() {
return review.getCommitId();
}

@Whitelisted
public long getId() {
return review.getId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class Review implements Serializable {
.collect(Collectors.collectingAndThen(Collectors.toSet(), Collections::unmodifiableSet));

private String body;
private String commitId;
private long id;
private User user;
private String state;
Expand All @@ -36,6 +37,15 @@ public Review setBody(final String body) {
return this;
}

public String getCommitId() {
return commitId;
}

public Review setCommitId(final String commitId) {
this.commitId = commitId;
return this;
}

public long getId() {
return id;
}
Expand Down

0 comments on commit 7fa0d37

Please sign in to comment.