From 330f73706ba20bef2ad0614a5508ea2599914240 Mon Sep 17 00:00:00 2001 From: Igor Demin Date: Mon, 15 Apr 2024 13:40:10 +0200 Subject: [PATCH] Sort by link --- tools/changelog.main.kts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/changelog.main.kts b/tools/changelog.main.kts index a323757399..c81cd22a66 100644 --- a/tools/changelog.main.kts +++ b/tools/changelog.main.kts @@ -134,10 +134,14 @@ fun entriesForRepo(repo: String): List { } } - return fetchPagedUntilEmpty { page -> + val commits = fetchPagedUntilEmpty { page -> request("https://api.github.com/repos/$repo/compare/$firstCommit...$lastCommit?per_page=1000&page=$page") .commits - }.map { changelogEntryFor(it, prForCommit(it)) } + } + + return commits + .map { changelogEntryFor(it, prForCommit(it)) } + .sortedBy { it.link } } /**