From 17340e6d1daa4944cade711dccebac36a3fd5c5c Mon Sep 17 00:00:00 2001 From: t-takahashi Date: Sun, 8 Jan 2023 15:23:29 +0900 Subject: [PATCH] =?UTF-8?q?sorted=20=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/github/tttol/mrls/service/MergeRequestService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/tttol/mrls/service/MergeRequestService.java b/src/main/java/io/github/tttol/mrls/service/MergeRequestService.java index 4c504f8..e1f2b0b 100644 --- a/src/main/java/io/github/tttol/mrls/service/MergeRequestService.java +++ b/src/main/java/io/github/tttol/mrls/service/MergeRequestService.java @@ -8,6 +8,7 @@ import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; +import java.util.Comparator; import java.util.List; import java.util.Objects; import java.util.Optional; @@ -26,7 +27,9 @@ public List get() { e.getAuthor().getId() : e.getAssignee().getId() ) ) - .values().stream().map(this::generateForm).toList(); + .values().stream().map(this::generateForm) + .sorted(Comparator.comparing(e -> e.assignee().id())) + .toList(); } private List executeGitLabApi() {