Created
July 23, 2019 12:46
-
-
Save hennevogel/8ddd00f09eb5e83d3a8596119e1ad894 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require ["copy","fileinto","imap4flags"]; | |
# rule:[alerts] | |
if anyof (header :contains "subject" "[obs-errors] (100) [OBS Frontend][production]", header :contains "subject" "(100) [api.suse.de][production]", exists "X-Errbit-Comment-Author", header :is "subject" "[obs-errors] Job obs-server has exited with state 'failed'", header :contains "subject" "[obs-errors] Build failed in openQA", header :contains "subject" "[obs-errors] Build incomplete in openQA") | |
{ | |
fileinto :copy "INBOX/alerts"; | |
fileinto "INBOX/notifications"; | |
stop; | |
} | |
# rule:[alerts-package-opensuse] | |
if allof (header :is "x-mailinglist" "obs-errors", header :contains "x-obs-package" "OBS:Server:Unstable/obs-server", header :is "x-obs-event-type" "build_fail", header :is "x-obs-repository" "openSUSE_42.3/x86_64") | |
{ | |
fileinto :copy "INBOX/alerts"; | |
fileinto "INBOX/notifications"; | |
stop; | |
} | |
# rule:[alerts-package-sle] | |
if allof (header :is "x-mailinglist" "obs-erros", header :contains "x-obs-package" "OBS:Server:Unstable/obs-server", header :is "x-obs-event-type" "build_fail", header :is "x-obs-repository" "SLE_12_SP4/x86_64") | |
{ | |
fileinto :copy "INBOX/alerts"; | |
fileinto "INBOX/notifications"; | |
stop; | |
} | |
# rule:[alerts-appliance] | |
if allof (header :is "x-mailinglist" "obs-errors", header :contains "x-obs-package" "OBS:Server:Unstable/OBS-Appliance", header :is "x-obs-event-type" "build_failed", header :is "x-obs-repository" "images/x86_64") | |
{ | |
fileinto :copy "INBOX/alerts"; | |
fileinto "INBOX/notifications"; | |
stop; | |
} | |
# rule:[rule:[notifications]] | |
if anyof (exists "X-Bugzilla-Reason", exists "X-Redmine-Issue-Id", header :is "x-mailer" "OBS Notification System", header :is "x-mailer" "Errbit", header :contains "message-id" "gitlab.suse.de", header :is "x-mailinglist" "obs-errors", header :contains "from" "rocket_no_reply") | |
{ | |
fileinto "INBOX/notifications"; | |
stop; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment