Merge "Allow a git ref to pin the governance repo"
This commit is contained in:
commit
2783a56a16
@ -14,7 +14,7 @@ elections and Summit invitations.
|
|||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
pip install paramiko requests pyyaml
|
pip install paramiko requests pyyaml
|
||||||
./email_stats.py --begin <BEGINDATE>
|
./email_stats.py --begin <BEGINDATE>
|
||||||
# optionally specify --end, --keyfile and --user
|
# optionally specify --end, --keyfile, --ref and --user
|
||||||
DATE=`date --iso`
|
DATE=`date --iso`
|
||||||
mv out $DATE
|
mv out $DATE
|
||||||
cat $DATE/*.csv | sort | uniq > $DATE/all.csv
|
cat $DATE/*.csv | sort | uniq > $DATE/all.csv
|
||||||
|
@ -188,18 +188,28 @@ def main():
|
|||||||
optparser.add_option(
|
optparser.add_option(
|
||||||
'-k', '--keyfile', default='~/.ssh/id_rsa',
|
'-k', '--keyfile', default='~/.ssh/id_rsa',
|
||||||
help='SSH key (default is ~/.ssh/id_rsa)')
|
help='SSH key (default is ~/.ssh/id_rsa)')
|
||||||
|
optparser.add_option(
|
||||||
|
'-r', '--ref', default='',
|
||||||
|
help='governance git ref (e.g. sept-2014-elections')
|
||||||
optparser.add_option(
|
optparser.add_option(
|
||||||
'-u', '--user', default=os.environ['USER'],
|
'-u', '--user', default=os.environ['USER'],
|
||||||
help='SSH username (default is $USER)')
|
help='SSH username (default is $USER)')
|
||||||
options, args = optparser.parse_args()
|
options, args = optparser.parse_args()
|
||||||
|
|
||||||
for project in get_projects(PROGRAMS_URL):
|
if options.ref:
|
||||||
|
programs_url = '%s?id=%s' % (PROGRAMS_URL, options.ref)
|
||||||
|
extra_atcs_url = '%s?id=%s' % (EXTRA_ATCS_URL, options.ref)
|
||||||
|
else:
|
||||||
|
programs_url = PROGRAMS_URL
|
||||||
|
extra_atcs_url = EXTRA_ATCS_URL
|
||||||
|
|
||||||
|
for project in get_projects(programs_url):
|
||||||
output = 'out/%s.csv' % project.split('/')[-1]
|
output = 'out/%s.csv' % project.split('/')[-1]
|
||||||
project_stats(project, output, options.begin, options.end,
|
project_stats(project, output, options.begin, options.end,
|
||||||
options.keyfile, options.user)
|
options.keyfile, options.user)
|
||||||
|
|
||||||
writer = csv.writer(open('out/extra-atcs.csv', 'w'))
|
writer = csv.writer(open('out/extra-atcs.csv', 'w'))
|
||||||
for atc in get_extra_atcs(EXTRA_ATCS_URL):
|
for atc in get_extra_atcs(extra_atcs_url):
|
||||||
try:
|
try:
|
||||||
writer.writerow([''] + list(EXTRA_ATC_RE.match(atc).groups()))
|
writer.writerow([''] + list(EXTRA_ATC_RE.match(atc).groups()))
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
Loading…
Reference in New Issue
Block a user