You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by hb...@apache.org on 2015/05/10 09:32:07 UTC

svn commit: r1678538 - /comdev/projects.apache.org/scripts/import/parsecommittees.py

Author: hboutemy
Date: Sun May 10 07:32:06 2015
New Revision: 1678538

URL: http://svn.apache.org/r1678538
Log:
added committers and pmc members to tlps.json

Modified:
    comdev/projects.apache.org/scripts/import/parsecommittees.py

Modified: comdev/projects.apache.org/scripts/import/parsecommittees.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/import/parsecommittees.py?rev=1678538&r1=1678537&r2=1678538&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/import/parsecommittees.py (original)
+++ comdev/projects.apache.org/scripts/import/parsecommittees.py Sun May 10 07:32:06 2015
@@ -34,6 +34,10 @@ with open("../../site/json/foundation/tl
     tlpsEvolution = json.loads(f.read())
     f.close()
 
+with open("../../site/json/foundation/people.json", "r") as f:
+    people = json.loads(f.read())
+    f.close()
+
 try:
     with open("committee-info.txt", "rb") as f:
         data = f.read().decode('utf-8')
@@ -82,16 +86,34 @@ for pmc in re.findall(r"\* .+?\s+\(est\.
             # add TLP to tlps
             tlp = {}
             tlp['id'] = tlp_id
+            gid = tlp_id
             if tlp_id in gids:
-                tlp['gid'] = gids[tlp_id]
+                gid = gids[tlp_id]
+                tlp['gid'] = gid
             tlp['name'] = project
             tlp['established'] = key
             if tlp_id in homepages:
                 tlp['homepage'] = homepages[tlp_id]
+            # TLP committers and PMC members
+            pmcgid = "%s-pmc" % gid
+            committers = {} # { 'login': 'full name' }
+            pmc = [] # [ 'login' ]
+            for login in people:
+                p = people[login]
+                if p['groups']:
+                    if gid in p['groups']:
+                        committers[login] = p['name']
+                    if pmcgid in p['groups']:
+                        pmc.append(login)
+                else:
+                    print("user %s has no groups" % login)
+            pmc.sort()
+            tlp['pmcs'] = pmc
+            tlp['committers'] = committers
+            if len(pmc) == 0:
+                print('WARN: %s (%s established in %s) has no PMC members (PMC group id=%s)' % (tlp_id, project, key, pmcgid))
             # TODO
             # tlp['chair'] = uid
-            # tlp['pmcs'] = { 'uid': 'full name' }
-            # tlp['committers'] = { 'uid': 'full name' }
             # tlp['reporting'] = 'j'/'f'/'m'
             # tlp['charter']
             # tlp['retired']