community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1858386 - /comdev/reporter.apache.org/trunk/scripts/committee_info.py
Date Mon, 29 Apr 2019 18:29:55 GMT
Author: sebb
Date: Mon Apr 29 18:29:55 2019
New Revision: 1858386

URL: http://svn.apache.org/viewvc?rev=1858386&view=rev
Log:
Get PMCs to which uid belongs

Modified:
    comdev/reporter.apache.org/trunk/scripts/committee_info.py

Modified: comdev/reporter.apache.org/trunk/scripts/committee_info.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/scripts/committee_info.py?rev=1858386&r1=1858385&r2=1858386&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/scripts/committee_info.py (original)
+++ comdev/reporter.apache.org/trunk/scripts/committee_info.py Mon Apr 29 18:29:55 2019
@@ -180,6 +180,20 @@ def cycles():
             cycles['http server'] = cycles[ctte]
     return cycles
 
+def getPMCs(uid, incubator=False):
+    """Returns the array of PMC committees to which the uid belongs. Excludes incubator by
default"""
+    pmcs = []
+    cttes = cidata['committees']
+    for ent in cttes:
+        ctte = cttes[ent]
+        if not ctte['pmc']:
+            continue
+        if ent == 'incubator' and not incubator:
+            continue
+        if uid in ctte['roster']:
+            pmcs.append(ent)
+    return pmcs
+
 if __name__ == '__main__':
     mails=PMCmails()
     print(mails)
@@ -190,3 +204,8 @@ if __name__ == '__main__':
     json.dump(PMCsummary(), sys.stdout, indent=1, sort_keys=True)
     json.dump(pmcdates(), sys.stdout, indent=1, sort_keys=True)
     json.dump(cycles(), sys.stdout, indent=1, sort_keys=True)
+    print("")
+    for arg in sys.argv[1:]:
+        print("%s member of: %s" % (arg, getPMCs(arg)))
+    for arg in sys.argv[1:]:
+        print("%s member of: %s" % (arg, getPMCs(arg, True)))



Mime
View raw message