[nagiosplug] Enable CIA's commit notifications

"Holger Weiss" <[email protected]>
Newsgroups gmane.network.nagios.plugins.cvs
Message-ID <[email protected]>
 Module: nagiosplug
 Branch: master
 Commit: 78fc8f4909750407585990aa10522d9510a69804
 Author: Holger Weiss <[email protected]>
   Date: Sun Dec  6 01:23:41 2009 +0100
    URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=78fc8f4

Enable CIA's commit notifications

We now use CIA's service to send commit notifications to IRC.  They are
currently sent to the #Nagios-Devel channel on Freenode.  See:

	http://cia.vc/stats/project/nagiosplug/
	http://cia.vc/account/bots/15699/

---

 tools/git-notify            |    4 ++--
 tools/git-post-receive-hook |    2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/git-notify b/tools/git-notify
index faa1785..d852823 100755
--- a/tools/git-notify
+++ b/tools/git-notify
@@ -48,7 +48,7 @@ sub get_repos_name();
 my $mailer = "/usr/bin/mail";
 
 # CIA notification address
-my $cia_address = "cia\@cia.navi.cx";
+my $cia_address = "cia\@cia.vc";
 
 # debug mode
 my $debug = 0;
@@ -327,7 +327,7 @@ sub mail_notification($$$@)
 {
     my ($name, $subject, $content_type, @text) = @_;
 
-    $subject = "[$repos_name] $subject" if $emit_repo;
+    $subject = "[$repos_name] $subject" if ($emit_repo and $name ne $cia_address);
     $subject = encode("MIME-Q",$subject);
 
     if ($debug)
diff --git a/tools/git-post-receive-hook b/tools/git-post-receive-hook
index 70d259e..fd1f869 100755
--- a/tools/git-post-receive-hook
+++ b/tools/git-post-receive-hook
@@ -4,11 +4,13 @@ prefix="${0%/*}/notifications"	# $GIT_DIR/hooks/notifications
 recipient='Nagios Plugin Commits <[email protected]>'
 maxcommits=100
 maxdiffsize=$((300 * 1024))
+project='nagiosplug'
 gitweburl='http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug'
 gitnotify="$prefix/git-notify.pl"
 statefile="$prefix/git-notify.dat"
 
 exec "$gitnotify" \
+  -c "$project" \
   -m "$recipient" \
   -n "$maxcommits" \
   -s "$maxdiffsize" \


------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.