Author: sebb Date: Wed Mar 10 23:27:26 2021 New Revision: 1887458 URL: http://svn.apache.org/viewvc?rev=1887458&view=rev Log: Automate mail list definition
Modified: attic/site/retire.py attic/site/xdocs/projects/_template.xml Modified: attic/site/retire.py URL: http://svn.apache.org/viewvc/attic/site/retire.py?rev=1887458&r1=1887457&r2=1887458&view=diff ============================================================================== --- attic/site/retire.py (original) +++ attic/site/retire.py Wed Mar 10 23:27:26 2021 @@ -44,6 +44,11 @@ def loadyaml(url): # get details of the retired projects retirees = loadyaml('https://whimsy.apache.org/public/committee-retired.json')['retired'] +lists = {} +for host,names in loadyaml('https://lists.apache.org/api/preferences.lua')['lists'].items(): + proj = host.replace('.apache.org','') + if proj in retirees: + lists[proj] = list(names.keys()) # updates xdocs/stylesheets/project.xml # <li><a href="/projects/abdera.html">Abdera</a></li> @@ -93,7 +98,13 @@ def create_project(pid): with open(join(projects, '_template.xml'), 'r') as t: template = Template(t.read()) meta = retirees[pid] - out = template.substitute(tlpid = pid, FullName = meta['display_name'], Month_Year = meta['retired'], description = meta['description']) + names = lists[pid] + names.remove('dev') + out = template.substitute(tlpid = pid, + FullName = meta['display_name'], + Month_Year = meta['retired'], + mail_names = ",".join(sorted(names)), + description = meta['description']) with open(outfile, 'w') as o: o.write(out) os.system("svn add %s" % outfile) Modified: attic/site/xdocs/projects/_template.xml URL: http://svn.apache.org/viewvc/attic/site/xdocs/projects/_template.xml?rev=1887458&r1=1887457&r2=1887458&view=diff ============================================================================== --- attic/site/xdocs/projects/_template.xml (original) +++ attic/site/xdocs/projects/_template.xml Wed Mar 10 23:27:26 2021 @@ -44,7 +44,7 @@ <!-- by default only dev is generated To remove 'dev', use the attribute replace_dev="xxx" in the resource_table tag above --> - <mail name="user"/> + <mail name="${mail_names}"/> <!-- use attribute key="" to override default JIRA --> <jira/> <!-- use the tag