add support for resolve[sd]? in commit references - fixes #409

Wed, 07 Aug 2024 18:11:24 +0200

author
Mike Becker <universe@uap-core.de>
date
Wed, 07 Aug 2024 18:11:24 +0200
changeset 319
900ecf43f791
parent 318
50052f2fbb3f
child 320
eb77a4149789

add support for resolve[sd]? in commit references - fixes #409

src/main/kotlin/de/uapcore/lightpit/types/CommitRef.kt file | annotate | diff | comparison | revisions
src/main/webapp/WEB-INF/changelogs/changelog-de.jspf file | annotate | diff | comparison | revisions
src/main/webapp/WEB-INF/changelogs/changelog.jspf file | annotate | diff | comparison | revisions
src/test/kotlin/de/uapcore/lightpit/types/CommitRefTest.kt file | annotate | diff | comparison | revisions
--- a/src/main/kotlin/de/uapcore/lightpit/types/CommitRef.kt	Wed Aug 07 18:09:04 2024 +0200
+++ b/src/main/kotlin/de/uapcore/lightpit/types/CommitRef.kt	Wed Aug 07 18:11:24 2024 +0200
@@ -31,11 +31,12 @@
 /**
  * Takes a [commitLog] in format `::lpitref::{node}:{desc}` and parses commit references.
  * Supported references are (in this example, 47 is the issue ID):
- *  - fixes #47
- *  - fix #47
- *  - closes #47
- *  - close #47
+ *  - fix, fixes, fixed #47
+ *  - close, closes, closed #47
+ *  - resolve, resolves, resolved #47
+ *  - relate to #47
  *  - relates to #47
+ *  - issue #37
  */
 fun parseCommitRefs(commitLog: String): List<CommitRef> = buildList {
     val marker = "::lpitref:"
@@ -53,7 +54,7 @@
         if (currentHash.isEmpty()) continue
 
         // scan the lines for commit references
-        Regex("""(?:issue|relates? to|fix(?:e[sd])?|close(?:[sd])?) \#(\d+)""")
+        Regex("""(?:issue|relates? to|fix(?:e[sd])?|(?:close|resolve)[sd]?) #(\d+)""")
             .findAll(line)
             .map { it.groupValues[1] }
             .map { it.toIntOrNull() }
--- a/src/main/webapp/WEB-INF/changelogs/changelog-de.jspf	Wed Aug 07 18:09:04 2024 +0200
+++ b/src/main/webapp/WEB-INF/changelogs/changelog-de.jspf	Wed Aug 07 18:11:24 2024 +0200
@@ -30,6 +30,7 @@
     <li>Neue globale Vorgangsseite hinzugefügt.</li>
     <li>Filter für Bearbeiter hinzugefügt.</li>
     <li>Filter für Vorgangsphasen hinzugefügt.</li>
+    <li>Unterstützung für <em>resolve</em>, <em>resolves</em>, <em>resolved</em> in Commit-Referenzen hinzugefügt.</li>
     <li>Erweiterte Filter werden nun automatisch angezeigt, wenn einer von ihnen in Verwendung ist.</li>
     <li>Automatische Zuweisung von Vorgängen bezieht neben der Leitung für eine Komponente nun auch die Leitung des Projektes ein.</li>
     <li>Der "OK" Button im Vorgangseditor führt nun zurück zur Vorgangsübersicht.</li>
--- a/src/main/webapp/WEB-INF/changelogs/changelog.jspf	Wed Aug 07 18:09:04 2024 +0200
+++ b/src/main/webapp/WEB-INF/changelogs/changelog.jspf	Wed Aug 07 18:11:24 2024 +0200
@@ -30,6 +30,7 @@
     <li>Add new Issues page to globally list all issues across all projects.</li>
     <li>Add filter for assignee.</li>
     <li>Add filter for issue phases.</li>
+    <li>Add support for <em>resolve</em>, <em>resolves</em>, <em>resolved</em> in commit references.</li>
     <li>Advanced filter are now automatically shown when one of them is used.</li>
     <li>Automatic assignment of issue now uses the project lead as fallback when no component lead is available.</li>
     <li>The "OK" button in the issue editor now leads to the issue overview.</li>
--- a/src/test/kotlin/de/uapcore/lightpit/types/CommitRefTest.kt	Wed Aug 07 18:09:04 2024 +0200
+++ b/src/test/kotlin/de/uapcore/lightpit/types/CommitRefTest.kt	Wed Aug 07 18:11:24 2024 +0200
@@ -51,7 +51,7 @@
             parseCommitRefs("""
 ::lpitref:cf9f5982ddeb28c7f695dc547fe73abf5460016f:here we fix #50
 
-and close #30 which blocked issue #80
+and resolve #30 which blocked issue #80
 ::lpitref:ed7134e5f4ce278c4f62798fb9f96129be2b132b:commit with a #non-ref, relates to #wrong ref but still closes #1337
 ::lpitref:74d770da3c80c0c3fc1fb7e44fb710d665127dfe:a change with commitrefs only in body
 

mercurial