community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1665505 - /comdev/reporter.apache.org/site/getjson.py
Date Tue, 10 Mar 2015 12:31:35 GMT
Author: humbedooh
Date: Tue Mar 10 12:31:35 2015
New Revision: 1665505

URL: http://svn.apache.org/r1665505
Log:
add a bit of mapping for funky ldap groups

Modified:
    comdev/reporter.apache.org/site/getjson.py

Modified: comdev/reporter.apache.org/site/getjson.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/site/getjson.py?rev=1665505&r1=1665504&r2=1665505&view=diff
==============================================================================
--- comdev/reporter.apache.org/site/getjson.py (original)
+++ comdev/reporter.apache.org/site/getjson.py Tue Mar 10 12:31:35 2015
@@ -13,7 +13,12 @@ jmap = {
 }
 
 pmap = {
-    'community': 'comdev'
+    'community': 'comdev',
+    'ws': 'webservices'
+}
+
+ldapmap = {
+    'webservices': 'ws'
 }
 
 jirapass = ""
@@ -223,10 +228,13 @@ if m:
     for group in groups:
         jiras = []
         count[group] = [0,0]
-        if group in pchanges:
-            count[group][0] = len(pchanges[group])
-        if group in cchanges:
-            count[group][1] = len(cchanges[group])
+        xgroup = group
+        if group in ldapmap:
+            xgroup = ldapmap[group]
+        if xgroup in pchanges:
+            count[group][0] = len(pchanges[xgroup])
+        if xgroup in cchanges:
+            count[group][1] = len(cchanges[xgroup])
         jdata[group] = [0,0, None]
         ddata[group], allpmcs = getProjectData(group)
         rdata[group] = getReleaseData(group)
@@ -251,14 +259,14 @@ if m:
             jdata[group][1] += y
             jdata[group][2] = p
 
-        cdata[group] = cdata[group] if group in cdata else {'pmc': {}, 'committer': {}}
+        cdata[group] = cdata[xgroup] if xgroup in cdata else {'pmc': {}, 'committer': {}}
         for pmc in pchanges:
-            if pmc == group:
+            if pmc == xgroup:
                 for member in pchanges[pmc]:
                     if pchanges[pmc][member][1] > 0:
                         cdata[group]['pmc'][member] = pchanges[pmc][member]
         for pmc in cchanges:
-            if pmc == group:
+            if pmc == xgroup:
                 for member in cchanges[pmc]:
                     if cchanges[pmc][member][1] > 0:
                         cdata[group]['committer'][member] = cchanges[pmc][member]



Mime
View raw message