summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2019-10-04 17:42:51 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2019-10-04 21:04:24 +0200
commitad2e9e582e1bbc9b1146cfe492b14b982425756e (patch)
treebdce44bf6f6af896dc11ba4b982a2cdbe408223b
parente31384ccc4c0eab44d9849fda18faa03bdfef51b (diff)
ESC: Add list of patches automatically abandoned in the last week
-rwxr-xr-xesc-reporting/esc-analyze.py15
-rwxr-xr-xesc-reporting/esc-report.py17
2 files changed, 27 insertions, 5 deletions
diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py
index 05e8e263..3326360f 100755
--- a/esc-reporting/esc-analyze.py
+++ b/esc-reporting/esc-analyze.py
@@ -634,7 +634,8 @@ def analyze_reports():
'easyhacks_new': [],
'too_many_comments': [],
'top10commit': [],
- 'top10review': []}
+ 'top10review': [],
+ 'abandonedPatches': []}
fileAutomate = cfg['homedir'] + 'automateTODO.json'
automateList = util_load_data_file(fileAutomate)
automateList['gerrit']['to_abandon_abandon'] = {}
@@ -687,6 +688,7 @@ def analyze_reports():
# only accepts ambiguous changeID, doesn't help, so fullid is not really fullid, but at least
# less prone to conflicts than just changeset-number that also can easily prefix-match commit-hashes
entry = {'id': key, 'fullid': row['change_id'], 'name': row['owner']['name'], 'email': ownerEmail, 'title': row['subject']}
+
if row['status'] != 'ABANDONED':
if ownerEmail is None:
ownerEmail = row['owner']['email']
@@ -697,6 +699,16 @@ def analyze_reports():
and not is_domain_mapped(ownerEmail):
entry['license'] = 'GERRIT: ' + statList['people'][ownerEmail]['licenseText']
statList['reportList']['missing_license'].append(entry)
+ else:
+ if row['branch'] == 'master':
+ for message in row['messages']:
+ messageDate = datetime.datetime.strptime(message['date'], '%Y-%m-%d %H:%M:%S.%f000')
+ if messageDate >= cfg['1weekDate']:
+ if message['author']['username'] == 'pootlebot' and 'inactivity' in message['message']:
+ x = {'name': entry['name'],
+ 'title': entry['title'],
+ 'id': entry['id']}
+ statList['reportList']['abandonedPatches'].append(x)
if row['status'] == 'NEW':
doBlock = False
@@ -715,6 +727,7 @@ def analyze_reports():
else:
patchset = 1
txt = ''
+
if xDate < cfg['1monthDate'] and not doBlock:
# gerrit cli sucks and doesn't accept changeset,patchrev but only uses numericID
if 'A polite ping' in txt:
diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py
index 49a0e910..9f543217 100755
--- a/esc-reporting/esc-report.py
+++ b/esc-reporting/esc-report.py
@@ -199,10 +199,19 @@ def report_mentoring():
reviewer['name'],
reviewer['month'],
reviewer['year']), file=fp)
-
- print(" + big CONGRATULATIONS to contributors who have at least 1 merged patch, since last report:", file=fp)
- for row in statList['reportList']['award_1st_email']:
- print(' {} {} {}'.format(row['name'],row['email'],row['license']), file=fp)
+ if statList['reportList']['abandonedPatches']:
+ print(" + Patches automatically abandoned:", file=fp)
+ for patch in statList['reportList']['abandonedPatches']:
+ print(' {} ( {} )'.format(
+ patch['title'],
+ patch['name']), file=fp)
+ print(' - https://gerrit.libreoffice.org/#/c/{}'.format(
+ patch['id']), file=fp)
+
+ if statList['reportList']['award_1st_email']:
+ print(" + big CONGRATULATIONS to contributors who have at least 1 merged patch, since last report:", file=fp)
+ for row in statList['reportList']['award_1st_email']:
+ print(' {} {} {}'.format(row['name'],row['email'],row['license']), file=fp)
fp.close()
return