src/main/kotlin/de/uapcore/lightpit/types/CommitRef.kt

changeset 288
10324c383126
parent 282
c112fad21bf6
equal deleted inserted replaced
287:2aabfe7709c4 288:10324c383126
51 51
52 // skip possible preamble output 52 // skip possible preamble output
53 if (currentHash.isEmpty()) continue 53 if (currentHash.isEmpty()) continue
54 54
55 // scan the lines for commit references 55 // scan the lines for commit references
56 Regex("""(?:relates to|fix(?:es)?|close(?:es)?) #(\d+)""") 56 Regex("""(?:issue|relates? to|fix(?:e[sd])?|close(?:[sd])?) \#(\d+)""")
57 .findAll(line) 57 .findAll(line)
58 .map { it.groupValues[1] } 58 .map { it.groupValues[1] }
59 .map { it.toIntOrNull() } 59 .map { it.toIntOrNull() }
60 .filterNotNull() 60 .filterNotNull()
61 .forEach { commitId -> add(CommitRef(currentHash, commitId, currentDesc)) } 61 .forEach { commitId -> add(CommitRef(currentHash, commitId, currentDesc)) }

mercurial