Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hennevogel/9e04349f5495336f82b79a72f1e6b128 to your computer and use it in GitHub Desktop.
Save hennevogel/9e04349f5495336f82b79a72f1e6b128 to your computer and use it in GitHub Desktop.
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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment