[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-automate.py
jan Iversen
jani at libreoffice.org
Tue May 9 09:39:31 UTC 2017
esc-reporting/esc-analyze.py | 65 ++++++++++++++++++++++--------------------
esc-reporting/esc-automate.py | 13 ++++++++
2 files changed, 48 insertions(+), 30 deletions(-)
New commits:
commit 0f6c1576ec694642185ad7fd8a39ab7987838220
Author: jan Iversen <jani at libreoffice.org>
Date: Tue May 9 11:37:02 2017 +0200
esc-report, prepare data for automate
diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py
index 42c966e..081aaca 100755
--- a/esc-reporting/esc-analyze.py
+++ b/esc-reporting/esc-analyze.py
@@ -222,7 +222,7 @@ def util_create_statList():
'people': {},
'escList': {},
'reportList': {},
- 'automateList': {'bugzilla': {}, 'gerrit': {}, 'pdf': {}}}
+ 'automateList': {'bugzilla': {}, 'gerrit': {}, 'mail': {}}}
@@ -572,8 +572,7 @@ def analyze_reports():
print("reports: analyze", flush=True)
mailedDate = datetime.datetime.strptime(cfg['git']['last-mail-run'], '%Y-%m-%d') - datetime.timedelta(days=90)
zeroDate = datetime.datetime(year=2001, month=1, day=1)
- statList['reportList'] = {'we_miss_you_email': [],
- 'award_1st_email': [],
+ statList['reportList'] = {'award_1st_email': [],
'pending_license': [],
'missing_license': [],
'to_be_closed': [],
@@ -584,21 +583,27 @@ def analyze_reports():
'too_many_comments': [],
'top10commit': [],
'top10review': []}
- automateList = {'to_abandon': [],
- 'to_review': [],
- 'missing_ui_cc': [],
- 'to_unassign': [],
- 'missing_cc': [],
- 'assign_problem': [],
- 'remove_cc': []}
-
+ statList['automateList']['gerrit'] = {'to_abandon_comment': [],
+ 'to_abandon_abandon': [],
+ 'to_review': []}
+ statList['automateList']['bugzilla'] = {'missing_ui_cc': [],
+ 'to_unassign_comment': [],
+ 'to_unassign_unassign': [],
+ 'missing_cc': [],
+ 'assign_problem_status': [],
+ 'assign_problem_user': [],
+ 'remove_cc': []}
+ statList['automateList']['mail'] = {'we_miss_you_email': [],
+ 'award_1st_email': []}
+
for id, row in statList['people'].items():
entry = {'name': row['name'], 'email': id, 'license': row['licenseText']}
if row['newestCommit'] > mailedDate and row['newestCommit'] < cfg['3monthDate']:
- statList['reportList']['we_miss_you_email'].append(entry)
+ statList['automateList']['mail']['we_miss_you_email'].append(entry)
x = row['commits']['1month']['owner']
if x != 0 and row['commits']['total'] == x and not id in cfg['award-mailed']:
statList['reportList']['award_1st_email'].append(entry)
+ statList['automateList']['mail']['award_1st_email'].append(entry)
if row['licenseText'].startswith('PENDING'):
statList['reportList']['pending_license'].append(entry)
@@ -628,9 +633,13 @@ def analyze_reports():
if x['email'] != ownerEmail and x['email'] != 'ci at libreoffice.org':
cntReview += 1
if xDate < cfg['1monthDate'] and not doBlock:
- automateList['to_abandon'].append(entry)
+ txt = row['messages'][len(row['messages'])-1]
+ if 'A polite ping' in txt:
+ statList['automateList']['gerrit']['to_abandon_abandon'].append(entry)
+ else:
+ statList['automateList']['gerrit']['to_abandon_comment'].append(entry)
if cntReview == 0 and not statList['people'][ownerEmail]['isCommitter']:
- automateList['to_review'].append(entry)
+ statList['automateList']['gerrit']['to_review'].append(entry)
for key, row in bugzillaData['bugs'].items():
if not 'cc' in row:
@@ -643,7 +652,7 @@ def analyze_reports():
if not 'easyHack' in row['keywords']:
if 'mentoring' in row['cc']:
- automateList['remove_cc'].append(key)
+ statList['automateList']['bugzilla']['remove_cc'].append(key)
continue
if 'needsDevEval' in row['keywords']:
@@ -651,20 +660,25 @@ def analyze_reports():
if 'needsUXEval' in row['keywords']:
statList['reportList']['needsUXEval'].append(key)
if 'topicUI' in row['keywords'] and 'libreoffice-ux-advise at lists.freedesktop.org' not in row['cc']:
- automateList['missing_ui_cc'].append(key)
+ statList['automateList']['bugzilla']['missing_ui_cc'].append(key)
if row['status'] == 'NEEDINFO':
statList['reportList']['needinfo'].append(key)
elif row['status'] == 'ASSIGNED':
xDate = datetime.datetime.strptime(row['last_change_time'], "%Y-%m-%dT%H:%M:%SZ")
if xDate < cfg['1monthDate']:
- automateList['to_unassign'].append(key)
- if (row['status'] == 'ASSIGNED' and (row['assigned_to'] == '' or row['assigned_to'] == 'libreoffice-bugs at lists.freedesktop.org')) or \
- (row['status'] != 'ASSIGNED' and row['assigned_to'] != '' and row['assigned_to'] != 'libreoffice-bugs at lists.freedesktop.org') :
- automateList['assign_problem'].append(key)
+ txt = row['comments'][len(row['comments'])-1]
+ if 'A polite ping' in txt:
+ statList['automateList']['bugzilla']['to_unassign_unassign'].append(key)
+ else:
+ statList['automateList']['bugzilla']['to_unassign_comment'].append(key)
+ if row['status'] == 'ASSIGNED' and (row['assigned_to'] == '' or row['assigned_to'] == 'libreoffice-bugs at lists.freedesktop.org'):
+ statList['automateList']['bugzilla']['assign_problem_status'].append(key)
+ if row['status'] != 'ASSIGNED' and row['assigned_to'] != '' and row['assigned_to'] != 'libreoffice-bugs at lists.freedesktop.org':
+ statList['automateList']['bugzilla']['assign_problem_user'].append(key)
if len(row['comments']) >= 5:
statList['reportList']['too_many_comments'].append(key)
if not 'mentoring at documentfoundation.org' in row['cc']:
- automateList['missing_cc'].append(key)
+ statList['automateList']['bugzilla']['missing_cc'].append(key)
if row['comments'][-1]['creator'] == 'libreoffice-commits at lists.freedesktop.org' and not key in cfg['bugzilla']['close_except']:
statList['reportList']['to_be_closed'].append(key)
cDate = datetime.datetime.strptime(row['creation_time'], "%Y-%m-%dT%H:%M:%SZ")
@@ -690,15 +704,6 @@ def analyze_reports():
if len(statList['reportList']['top10review']) >= 10:
break
- statList['automateList']['bugzilla'] = {'missing_ui_cc': automateList['missing_ui_cc'],
- 'to_unassign': automateList['to_unassign'],
- 'missing_cc': automateList['missing_cc'],
- 'assign_problem': automateList['assign_problem'],
- 'remove_cc': automateList['remove_cc']}
- statList['automateList']['bugzilla'] = {'to_review': automateList['to_review'],
- 'to_abandon': automateList['to_abandon']}
- statList['automateList']['pdf'] = {'award_1st_email': statList['reportList']['award_1st_email']}
- statList['automateList'] = automateList
def analyze_myfunc():
diff --git a/esc-reporting/esc-automate.py b/esc-reporting/esc-automate.py
index 7074a72..e8cb77f 100755
--- a/esc-reporting/esc-automate.py
+++ b/esc-reporting/esc-automate.py
@@ -81,6 +81,19 @@ def runAutomate():
autoList = util_load_data_file(cfg['homedir'] + 'stats.json')['automateList']
+ # analyze test for:
+ # "A polite ping"
+
+ # gerrit non-committer patches > 4 weeks: overdue review / poking reminders --> "to_abandon_comment"
+ # gerrit patches > extra 4 weeks: auto-abandon if no comments / changes. --> "to_abandon_abandon"
+ # gerrit patches from non-committers, add reviewer --> "to_review"
+ # bugzilla: easy-hacks: un-assign those un-touched for 4 weeks to de-conflict --> "to_unassign_comment" "to_unassign_unassign"
+ # bugzilla extra: easy-hacks, check assign consistent --> "assign_problem_status" "assign_problem_user",
+ # bugzilla: checking mentoring@ is CC'd on all easy-hacks --> "missing_cc"
+ # bugzilla:checking UX team is CC'd on all UX hacks --> "missing_ui_cc"
+ # 1st patch award email auto-generate that --> "award_1st_email"
+ # "we miss you" email --> "we_miss_you_email"
+
xMail = []
try:
x = automate_gerrit()
More information about the Libreoffice-commits
mailing list