Wed, 07 Aug 2024 18:02:38 +0200
fix order of commit references - fixes #375
--- a/src/main/kotlin/de/uapcore/lightpit/types/CommitRef.kt Wed Aug 07 18:01:11 2024 +0200 +++ b/src/main/kotlin/de/uapcore/lightpit/types/CommitRef.kt Wed Aug 07 18:02:38 2024 +0200 @@ -58,7 +58,7 @@ .map { it.groupValues[1] } .map { it.toIntOrNull() } .filterNotNull() - .forEach { commitId -> add(CommitRef(currentHash, commitId, currentDesc)) } + .forEach { commitId -> addFirst(CommitRef(currentHash, commitId, currentDesc)) } } }
--- a/src/test/kotlin/de/uapcore/lightpit/types/CommitRefTest.kt Wed Aug 07 18:01:11 2024 +0200 +++ b/src/test/kotlin/de/uapcore/lightpit/types/CommitRefTest.kt Wed Aug 07 18:02:38 2024 +0200 @@ -47,7 +47,7 @@ CommitRef("74d770da3c80c0c3fc1fb7e44fb710d665127dfe", 13, "a change with commitrefs only in body"), CommitRef("9a14e5628bdf2d578f3385d78022ddcaf23d1abb", 47, "add test file - closed #47 and fixed #90"), CommitRef("9a14e5628bdf2d578f3385d78022ddcaf23d1abb", 90, "add test file - closed #47 and fixed #90") - ), + ).reversed(), parseCommitRefs(""" ::lpitref:cf9f5982ddeb28c7f695dc547fe73abf5460016f:here we fix #50