From 9beb250cf9eed05ba1139b202bf2412b07978ef5 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:04:31 +0200 Subject: git-notify: Ignore GitHub pull requests GitHub uses the refs/pull namespace for pull requests. diff --git a/libexec/git-notify b/libexec/git-notify index 8514296..316336e 100755 --- a/libexec/git-notify +++ b/libexec/git-notify @@ -3,7 +3,7 @@ # Tool to send git commit notifications # # Copyright 2005 Alexandre Julliard -# Copyright 2009 Nagios Plugins Development Team +# Copyright 2009, 2013 Nagios Plugins Development Team # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as @@ -589,7 +589,7 @@ sub send_all_notices($$$) my ($old_sha1, $new_sha1, $ref) = @_; my ($reftype, $refname, $tagtype, $action, @notice); - return if ($ref =~ /^refs\/remotes\// + return if ($ref =~ /^refs\/(?:remotes|pull)\// or (@include_list && !grep {$_ eq $ref} @include_list)); die "The name \"$ref\" doesn't sound like a local branch or tag" if not (($reftype, $refname) = ($ref =~ /^refs\/(head|tag)s\/(.+)/)); -- cgit v0.10-9-g596f