summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjan Iversen <jani@documentfoundation.org>2017-01-10 13:56:27 +0100
committerjan Iversen <jani@documentfoundation.org>2017-01-10 13:56:27 +0100
commitf38b77f5046c5566eb8a77231a897e8af469b7db (patch)
treea5c6eb2886e06737792e02e90ac4c809d306d3e4
parent11eb01ba95103fa2cb95d77a2bff1eb7db506c72 (diff)
esc-mentoring update to match new gitdm-config
gitdm-config have been changed to use lowercase email addr only (converted), and as a consequence the mail search algorithms have been updated
-rwxr-xr-xesc-reporting/esc-analyze.py9
-rwxr-xr-xesc-reporting/esc-collect.py12
-rwxr-xr-xesc-reporting/esc-report.py3
3 files changed, 12 insertions, 12 deletions
diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py
index c28667b..eabbd64 100755
--- a/esc-reporting/esc-analyze.py
+++ b/esc-reporting/esc-analyze.py
@@ -70,8 +70,6 @@ def util_load_csv(fileName, split):
global statList
rawData = {}
with open(fileName, 'r', encoding='utf-8') as fp:
- fp.readline()
- fp.readline()
for line in fp:
line = line[:-1]
if len(line) == 0:
@@ -150,7 +148,7 @@ def util_create_person_gerrit(person, email):
'1month': {'owner': 0, 'reviewer': 0},
'1week': {'owner': 0, 'reviewer': 0},
'total': 0,
- 'userName': '*DUMMY*'},
+ 'userName': '*dummy*'},
'ui': {'1year': {'commented': 0, 'history': 0},
'3month': {'commented': 0, 'history': 0},
'1month': {'commented': 0, 'history': 0},
@@ -223,14 +221,15 @@ def util_create_statList():
-def util_check_mail(name, mail):
+def util_check_mail(name, xmail):
global statList
+ mail = xmail.lower()
if mail in statList['aliases']:
mail = statList['aliases'][mail]
if not mail in statList['people']:
statList['people'][mail] = util_create_person_gerrit(name, mail)
- if mail == '*DUMMY*':
+ if mail == '*dummy*':
statList['people'][mail]['licenseOK'] = True
else:
if name and name != '*UNKNOWN*' and statList['people'][mail]['name'] == '*UNKNOWN*':
diff --git a/esc-reporting/esc-collect.py b/esc-reporting/esc-collect.py
index e222485..49aadb7 100755
--- a/esc-reporting/esc-collect.py
+++ b/esc-reporting/esc-collect.py
@@ -184,7 +184,7 @@ def get_gerrit(cfg):
for row in tmp:
for i in 'username', 'email':
if not i in row:
- row[i] = '*DUMMY*'
+ row[i] = '*dummy*'
rawList['committers'].append(row)
url = urlBase + 'changes/?q=after:' + searchDate.strftime("%Y-%m-%d") + \
@@ -197,13 +197,13 @@ def get_gerrit(cfg):
for row in tmp:
for i in 'email', 'username', 'name':
if not i in row['owner']:
- row['owner'][i] = '*DUMMY*'
+ row['owner'][i] = '*dummy*'
for x in row['messages']:
if not 'author' in x:
x['author'] = {}
for i in 'email', 'username', 'name':
if not i in x['author']:
- x['author'][i] = '*DUMMY*'
+ x['author'][i] = '*dummy*'
for i in 'Verified', 'Code-Review':
if not i in row['labels']:
row['labels'][i] = {}
@@ -211,11 +211,11 @@ def get_gerrit(cfg):
row['labels'][i]['all'] = []
for x in row['labels'][i]['all']:
if 'name' not in x:
- x['name'] = '*DUMMY*'
+ x['name'] = '*dummy*'
if 'email' not in x:
- x['email'] = '*DUMMY*'
+ x['email'] = '*dummy*'
if 'username' not in x:
- x['username'] = '*DUMMY*'
+ x['username'] = '*dummy*'
if 'value' not in x:
x['value'] = 0
diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py
index 46899c7..c018dfe 100755
--- a/esc-reporting/esc-report.py
+++ b/esc-reporting/esc-report.py
@@ -52,8 +52,9 @@ def util_load_data_file(fileName):
-def util_check_mail(mail):
+def util_check_mail(xmail):
global statList
+ mail = xmail.lower()
if mail in statList['aliases']:
mail = statList['aliases'][mail]
if not mail in statList['people']: