Skip to content
Browse files

Dashboard: Add spam protection

  • Loading branch information...
oschuett committed Aug 7, 2019
1 parent a20a5e0 commit e4cf6be54a6ad9d8603246807777f8a4d0f186e0
Showing with 6 additions and 2 deletions.
  1. +6 −2 tools/dashboard/
@@ -373,13 +373,17 @@ def send_notification(report, last_ok, log, name, s):
if(idx_end == idx_last_ok): return # probably a flapping tester
emails = set([log[i]['author-email'] for i in range(idx_end, idx_last_ok)])
emails = [e for e in emails if "noreply" not in e]
emails_str = ", ".join(emails)
if not emails:
return # no author emails found
if len(emails) > 3:
print("Spam protection, found more than three authors: " + emails_str)
if (not send_emails):
print("Email sending disabled, would otherwise send to: "+msg['To'])
print("Email sending disabled, would otherwise send to: " + emails_str)

print("Sending email to: "+", ".join(emails))
print("Sending email to: " + emails_str)

msg_txt = "Dear CP2K developer,\n\n"
msg_txt += "the dashboard has detected a problem that one of your recent commits might have introduced.\n\n"

0 comments on commit e4cf6be

Please sign in to comment.
You can’t perform that action at this time.