From e91c9d9472cc3a0acb6fff1e0a5cc9792f682774 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Thu, 20 Oct 2016 10:37:48 +0200 Subject: [PATCH] Let the alternative arch notification hook ignore epel and private branches --- roles/git/hooks/files/post-receive-secondaryarch | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/git/hooks/files/post-receive-secondaryarch b/roles/git/hooks/files/post-receive-secondaryarch index 9ad165f4b6..189c69cfed 100755 --- a/roles/git/hooks/files/post-receive-secondaryarch +++ b/roles/git/hooks/files/post-receive-secondaryarch @@ -147,6 +147,11 @@ def run_as_post_receive_hook(): print('Received:', line.strip()) (oldrev, newrev, refname) = line.strip().split(' ', 2) + # Skip all the branches that are not master and do not start with an 'f' + # ie: personal branches and epel + if not refname.startswith(('refs/heads/master', 'refs/heads/f')): + continue + new_commits_list = get_revs_between(oldrev, newrev, abspath, refname) if DEBUG: print('List of commits:', new_commits_list)