From aca7c02fc88bf5957ea3c8dcafe950fd3dac0f91 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Fri, 14 Feb 2014 12:18:14 +0100 Subject: filter-github-emails: Strip [monitoring-plugins] Now that we edit the GitHub notifications anyway, lets also strip the [monitoring-plugins] tag. We don't strip the tags of our other repositories, so that notifications for them do stand out (on the rare occasion we receive them). diff --git a/libexec/filter-github-emails b/libexec/filter-github-emails index 38c2168..9b86f7e 100755 --- a/libexec/filter-github-emails +++ b/libexec/filter-github-emails @@ -157,6 +157,12 @@ sub edit_header { $header->header_set('To' => $recipient); $header->header_set('X-MP-Content' => $description); + # Strip the [monitoring-plugins] tag. + my $subject = $header->header('Subject'); + $subject =~ s/^\[monitoring-plugins\] //; + $subject =~ s/^Re: \[monitoring-plugins\] /Re: /; + $header->header_set('Subject' => $subject); + return $header; } -- cgit v0.10-9-g596f