@@ -8,9 +8,9 @@ case class Commit(sha: String, author: String, header: String, body: String) {
8
8
object GitHelper {
9
9
val gitFormat = " --format=format:*-*%h``%aN``%s``%b"
10
10
def processGitCommits (input : String ): IndexedSeq [Commit ] =
11
- (( input split " [ \\ r \\ n]* \\ * \\ - \\ * " ).view map (_ split " ``" ) collect {
11
+ input.lines. map(_. split( " ``" , 4 )). collect {
12
12
case Array (sha, author, hdr, msg) => Commit (sha, author, hdr, msg)
13
- }) .toVector
13
+ }.toVector
14
14
15
15
def hasFixins (msg : String ): Boolean = (
16
16
(msg contains " SI-" ) /* && ((msg.toLowerCase contains "fix") || (msg.toLowerCase contains "close"))*/
@@ -34,10 +34,8 @@ class GitInfo(gitDir: java.io.File, val previousTag: String, val currentTag: Str
34
34
import sys .process ._
35
35
import GitHelper ._
36
36
37
- def runGit =
38
- Process (Seq (" git" , " log" , s " ${previousTag}.. ${currentTag}" ," --format=format:*-*%h``%aN``%s``%b" ," --no-merges" ), gitDir)
39
- val commits =
40
- processGitCommits(runGit.!! )
37
+ def runGit = Process (Seq (" git" , " log" , s " ${previousTag}.. ${currentTag}" ," --format=format:%h``%aN``%s``%b" ," --no-merges" ), gitDir)
38
+ val commits = processGitCommits(runGit.!! )
41
39
42
40
val authors : Seq [(String , Int )] = {
43
41
val grouped : Vector [(String ,Int )] = (commits groupBy (_.author)).map { case (a,c) => a -> c.length }{collection.breakOut}
0 commit comments