Przeglądaj źródła

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/
Holger Weiss 16 lat temu
rodzic
commit
78fc8f4909
2 zmienionych plików z 4 dodań i 2 usunięć
  1. 2 2
      tools/git-notify
  2. 2 0
      tools/git-post-receive-hook

+ 2 - 2
tools/git-notify

@@ -48,7 +48,7 @@ sub get_repos_name();
 my $mailer = "/usr/bin/mail";
 my $mailer = "/usr/bin/mail";
 
 
 # CIA notification address
 # CIA notification address
-my $cia_address = "cia\@cia.navi.cx";
+my $cia_address = "cia\@cia.vc";
 
 
 # debug mode
 # debug mode
 my $debug = 0;
 my $debug = 0;
@@ -327,7 +327,7 @@ sub mail_notification($$$@)
 {
 {
     my ($name, $subject, $content_type, @text) = @_;
     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);
     $subject = encode("MIME-Q",$subject);
 
 
     if ($debug)
     if ($debug)

+ 2 - 0
tools/git-post-receive-hook

@@ -4,11 +4,13 @@ prefix="${0%/*}/notifications"	# $GIT_DIR/hooks/notifications
 recipient='Nagios Plugin Commits <nagiosplug-checkins@lists.sourceforge.net>'
 recipient='Nagios Plugin Commits <nagiosplug-checkins@lists.sourceforge.net>'
 maxcommits=100
 maxcommits=100
 maxdiffsize=$((300 * 1024))
 maxdiffsize=$((300 * 1024))
+project='nagiosplug'
 gitweburl='http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug'
 gitweburl='http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug'
 gitnotify="$prefix/git-notify.pl"
 gitnotify="$prefix/git-notify.pl"
 statefile="$prefix/git-notify.dat"
 statefile="$prefix/git-notify.dat"
 
 
 exec "$gitnotify" \
 exec "$gitnotify" \
+  -c "$project" \
   -m "$recipient" \
   -m "$recipient" \
   -n "$maxcommits" \
   -n "$maxcommits" \
   -s "$maxdiffsize" \
   -s "$maxdiffsize" \