You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kibble.apache.org by hu...@apache.org on 2017/10/22 21:42:07 UTC
[kibble] branch master updated: Filter out robits here
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kibble.git
The following commit(s) were added to refs/heads/master by this push:
new e149a7f Filter out robits here
e149a7f is described below
commit e149a7f45a24c22aaf096c339483ac0e9cdc2cc2
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sun Oct 22 23:41:56 2017 +0200
Filter out robits here
we're not interested in them, we wanna see people on the list.
---
api/pages/mail/top-authors.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/api/pages/mail/top-authors.py b/api/pages/mail/top-authors.py
index 55879ef..52da07d 100644
--- a/api/pages/mail/top-authors.py
+++ b/api/pages/mail/top-authors.py
@@ -70,6 +70,9 @@ This is the TopN committers list renderer for Kibble
import json
import time
import hashlib
+import re
+
+ROBITS = r"(git|jira|jenkins|gerrit)@"
def run(API, environ, indata, session):
@@ -128,7 +131,7 @@ def run(API, environ, indata, session):
'authors': {
'terms': {
'field': 'sender',
- 'size': 25
+ 'size': 30
}
}
}
@@ -142,6 +145,9 @@ def run(API, environ, indata, session):
people = {}
for bucket in res['aggregations']['authors']['buckets']:
email = bucket['key']
+ # By default, we want to see humans, not bots on this list!
+ if re.match(ROBITS, email):
+ continue
count = bucket['doc_count']
sha = hashlib.sha1( ("%s%s" % (dOrg, email)).encode('utf-8') ).hexdigest()
if session.DB.ES.exists(index=session.DB.dbname,doc_type="person",id = sha):
--
To stop receiving notification emails like this one, please contact
['"commits@kibble.apache.org" <co...@kibble.apache.org>'].