summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2014-02-14 11:18:14 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2014-02-14 11:18:14 (GMT)
commitaca7c02fc88bf5957ea3c8dcafe950fd3dac0f91 (patch)
treeac665f0242d59093de08ba0173ebe50dce327976
parentc634471607cd83605fc334195514f136d90812d9 (diff)
downloadsite-aca7c02fc88bf5957ea3c8dcafe950fd3dac0f91.tar.gz
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).
-rwxr-xr-xlibexec/filter-github-emails6
1 files changed, 6 insertions, 0 deletions
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 {
157 $header->header_set('To' => $recipient); 157 $header->header_set('To' => $recipient);
158 $header->header_set('X-MP-Content' => $description); 158 $header->header_set('X-MP-Content' => $description);
159 159
160 # Strip the [monitoring-plugins] tag.
161 my $subject = $header->header('Subject');
162 $subject =~ s/^\[monitoring-plugins\] //;
163 $subject =~ s/^Re: \[monitoring-plugins\] /Re: /;
164 $header->header_set('Subject' => $subject);
165
160 return $header; 166 return $header;
161} 167}
162 168