diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-02-14 11:18:14 (GMT) |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-02-14 11:18:14 (GMT) |
commit | aca7c02fc88bf5957ea3c8dcafe950fd3dac0f91 (patch) | |
tree | ac665f0242d59093de08ba0173ebe50dce327976 /libexec/filter-github-emails | |
parent | c634471607cd83605fc334195514f136d90812d9 (diff) | |
download | site-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).
Diffstat (limited to 'libexec/filter-github-emails')
-rwxr-xr-x | libexec/filter-github-emails | 6 |
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 | ||