GitLogParser.js
authorAlan Knowles <alan@roojs.com>
Fri, 28 Apr 2017 02:44:23 +0000 (10:44 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 28 Apr 2017 02:44:23 +0000 (10:44 +0800)
GitLogParser.js

index 27d8bbe..8b4896f 100644 (file)
@@ -205,6 +205,21 @@ GitLogParser = {
          
     },
     
+    match_project : function(line) {
+        for(var proj in this.regexes) {
+            for(var r in this.regexes[proj]) {
+                if (line.match(this.regexes[proj][r])) {
+                    //print("Match " + proj + " on " + r + ret.line + )
+                    return  proj;
+
+                }
+            }
+            
+        }
+        return "Unknown";
+    },
+    
+    
     '/usr/bin/perl' : function(ret) {
         if (ret.title.match(/^PAC/)) {
             ret.project = 'Unknown';