#4238 hooks: Only block new branches
Merged 2 years ago by pingou. Opened 2 years ago by lsedlar.
lsedlar/pagure no-block-tags  into  master

@@ -70,6 +70,10 @@ 



          for refname in changes:

+             if refname.startswith("refs/tags/"):

+                 # Allow creating new tags

+                 continue


              (oldrev, newrev) = changes[refname]


              if set(oldrev) == set(["0"]):

Tags should be allowed, but any other new reference will be blocked.

Fixes: #4237

:thumbsup: thanks! :)

pretty please pagure-ci rebuild

2 years ago

The tests are failing locally for me as well, but it seems unrelated to this change. Only the style test fails because it wants to reformat /pagure/pagure/api/project.py.

pretty please pagure-ci rebuild

2 years ago

Ok, I'm going to merge as is and see if I can reproduce the issue locally.

I'm also working on changing how we run the test suite so it's easier to reproduce issues locally

Pull-Request has been merged by pingou

2 years ago