esc-reporting/esc-analyze.py |   18 ++++++++++++++++--
 esc-reporting/esc-report.py  |   17 +++++++++++++----
 2 files changed, 29 insertions(+), 6 deletions(-)

New commits:
commit ad2e9e582e1bbc9b1146cfe492b14b982425756e
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Fri Oct 4 17:42:51 2019 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Fri Oct 4 21:04:24 2019 +0200

    ESC: Add list of patches automatically abandoned in the last week

diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py
index 05e8e26..3326360 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 49a0e91..9f54321 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
 
commit e31384ccc4c0eab44d9849fda18faa03bdfef51b
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Fri Oct 4 17:08:23 2019 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Fri Oct 4 17:09:03 2019 +0200

    ESC: ignore jenkinscollaboraoffice from reviewers

diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py
index dc9c1c0..05e8e26 100755
--- a/esc-reporting/esc-analyze.py
+++ b/esc-reporting/esc-analyze.py
@@ -798,7 +798,8 @@ def analyze_reports():
                     break
     tmpRlist = sorted(statList['people'], key=lambda k: 
(statList['people'][k]['gerrit']['1month']['reviewer']),reverse=True)
     for i in tmpRlist:
-        if i != 'c...@libreoffice.org' and i != 
'fake-em...@fake-email-script-esc.com' and i != '*dummy*':
+        if i != 'c...@libreoffice.org' and i != 
'fake-em...@fake-email-script-esc.com' and \
+                i != '*dummy*' and i != 'jenkinscollaboraoff...@gmail.com':
             x = {'mail': i, 'name': statList['people'][i]['name'],
                  'month': 
statList['people'][i]['gerrit']['1month']['reviewer'],
                  'year': statList['people'][i]['gerrit']['1year']['reviewer']}
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to