filter events by user email
On some setup we might restrict a pipeline to trusted users. The new
email_filter will matches the email coming from the event account
attribute.
In Gerrit, each event hold the account in a different field
name so I have simply added a map to find out the correct field.
email_filter works just like comment_filter, fields are ORed and are
considered to be regex.
Change-Id: I775f67b48d5f162106c024f94fe498a049b3fe94
Reviewed-on: https://review.openstack.org/17609
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
diff --git a/doc/source/zuul.rst b/doc/source/zuul.rst
index 92b7a6f..416174d 100644
--- a/doc/source/zuul.rst
+++ b/doc/source/zuul.rst
@@ -246,6 +246,10 @@
``code-review: 2`` matches a ``+2`` vote on the code review category.
Multiple approvals may be listed.
+ *email_filter*
+ This is used for any event. It takes a regex applied on the performer
+ email. Example: ``email_filter: .*@example.org$``.
+
*comment_filter*
This is only used for ``comment-added`` events. It accepts a list of
regexes that are searched for in the comment string. If any of these