Skip to content
Permalink
Browse files
GitLab approval support missing asString
Reviewed-by: ehelin
  • Loading branch information
rwestberg committed Nov 4, 2020
1 parent c23ff3b commit c6d9e1902050edc8797b5e4e469ce8c20c6f86e5
Showing 1 changed file with 2 additions and 2 deletions.
@@ -107,13 +107,13 @@ class CommitDate {
var approvals = request.get("notes").execute().stream()
.map(JSONValue::asObject)
.filter(obj -> obj.get("system").asBoolean())
.filter(obj -> obj.get("body").contains("approved this merge request"))
.filter(obj -> obj.get("body").asString().contains("approved this merge request"))
.map(obj -> {
var reviewerObj = obj.get("author").asObject();
var reviewer = HostUser.create(reviewerObj.get("id").asInt(),
reviewerObj.get("username").asString(),
reviewerObj.get("name").asString());
var verdict = obj.get("body").contains("unapproved") ? Review.Verdict.NONE : Review.Verdict.APPROVED;
var verdict = obj.get("body").asString().contains("unapproved") ? Review.Verdict.NONE : Review.Verdict.APPROVED;
var createdAt = ZonedDateTime.parse(obj.get("created_at").asString());

// Find the latest commit that isn't created after our review

1 comment on commit c6d9e19

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on c6d9e19 Nov 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.