From c9ac743373938c0782d77bfb9bb0b05bfb1481f5 Mon Sep 17 00:00:00 2001 From: Slavek Kabrda Date: Nov 05 2018 08:51:55 +0000 Subject: Only run 'no new branches' hook on main git repo. Fixes #3977 --- diff --git a/pagure/hooks/pagure_no_new_branches.py b/pagure/hooks/pagure_no_new_branches.py index 69d51cf..052044b 100644 --- a/pagure/hooks/pagure_no_new_branches.py +++ b/pagure/hooks/pagure_no_new_branches.py @@ -65,6 +65,10 @@ class PagureNoNewBranchRunner(BaseRunner): For args, see BaseRunner.runhook. """ + if repotype != "main": + print("The no new branches hook only runs on the main git repo.") + return + for refname in changes: (oldrev, newrev) = changes[refname]