[Libreoffice-commits] dev-tools.git: 2 commits - qa/createWeeklyReport.py
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Nov 27 11:51:10 UTC 2018
qa/createWeeklyReport.py | 49 +++++++++++++++++++++++++++--------------------
1 file changed, 29 insertions(+), 20 deletions(-)
New commits:
commit 08175529f2ff18f1ce137b35460b65d541e8efe7
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Tue Nov 27 12:49:42 2018 +0100
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Nov 27 12:50:47 2018 +0100
QA: Add top 10 commenters
Suggested by Timur
diff --git a/qa/createWeeklyReport.py b/qa/createWeeklyReport.py
index 34d9432..a142e18 100755
--- a/qa/createWeeklyReport.py
+++ b/qa/createWeeklyReport.py
@@ -226,7 +226,10 @@ def analyze_bugzilla_weeklyReport(statList, bugzillaData, cfg):
common.util_check_bugzilla_mail(statList, commentMail, '', commentDate, rowId)
- if commentDate >= cfg['reportPeriod']:
+ if commentDate >= cfg['reportPeriod'] and \
+ commentMail != "libreoffice-commits at lists.freedesktop.org" and\
+ commentMail != "qa-admin at libreoffice.org" and\
+ comment['text'] != 'A polite ping, still working on this bug?':
if commentMail not in statList['comments_count']:
statList['comments_count'][commentMail] = 0
statList['comments_count'][commentMail] += 1
@@ -298,7 +301,7 @@ def util_print_QA_line_weekly(fp, statList, dValue, action, isMetabug=False):
else:
print(text, file=fp)
text = " " + personString + ", "
- if text is not " ":
+ if text != " ":
print(text[:-2], file=fp)
print(file=fp)
@@ -325,20 +328,29 @@ def create_weekly_Report(statList) :
print(file=fp)
d_view.sort(reverse=True)
- print(' * Top 15 reporters:', file=fp)
+ print(' * Top 10 reporters:', file=fp)
it = 0
for i1,i2 in d_view:
- try:
- if it >= 15:
- break
- print('\t\t+ ' + statList['people'][i2]['name'] + ' (' + str(i1) + ')', file=fp)
- it += 1
- except:
- continue
+ if it >= 10:
+ break
+ print('\t\t+ ' + statList['people'][i2]['name'] + ' (' + str(i1) + ')', file=fp)
+ it += 1
print(file=fp)
+ d_view = sorted(statList['comments_count'].items(), key=lambda kv: kv[1], reverse=True)
+
+ print(' * Top 10 commenters:', file=fp)
+
+ it = 0
+ for i in d_view:
+ if it >= 10:
+ break
+ print('\t\t+ ' + statList['people'][i[0]]['name'] + ' (' + str(i[1]) + ')', file=fp)
+ it += 1
+
+ print(file=fp)
print(" * {} bugs reported haven't been triaged yet.".format(\
len(statList['still_unconfirmed'])), file=fp)
commit 6fa3ee954b092120c4cae4099f7a10565f34836b
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Tue Nov 27 11:58:57 2018 +0100
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Nov 27 12:50:47 2018 +0100
QA: Some names were left behind when breaking the lines
diff --git a/qa/createWeeklyReport.py b/qa/createWeeklyReport.py
index f09dc19..34d9432 100755
--- a/qa/createWeeklyReport.py
+++ b/qa/createWeeklyReport.py
@@ -291,16 +291,13 @@ def util_print_QA_line_weekly(fp, statList, dValue, action, isMetabug=False):
text = " "
for i1,i2 in d_view:
- try:
- personString = statList['people'][i2]['name'] + ' (' + str(i1) + ')'
- # Reduce lines to 72 characters, for some reason the emails are cut otherwise
- if len( text + " " + personString ) < 72:
- text += personString + ", "
- else:
- print(text[:-2], file=fp)
- text = " "
- except:
- continue
+ personString = statList['people'][i2]['name'] + ' (' + str(i1) + ')'
+ # Reduce lines to 72 characters, for some reason the emails are cut otherwise
+ if len( text + " " + personString ) < 72:
+ text += personString + ", "
+ else:
+ print(text, file=fp)
+ text = " " + personString + ", "
if text is not " ":
print(text[:-2], file=fp)
More information about the Libreoffice-commits
mailing list