summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2015-03-31 17:09:43 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2015-03-31 17:21:19 +0100
commitc7edd49d23fa3f1179c611b52d946ff194039723 (patch)
treef036b0c7baa717eb7a950f24defe3da6493d62dc
parent8424eef4355d11af2a7c7f31f6c9ab38d370fb71 (diff)
downloadinfrastructure-c7edd49d23fa3f1179c611b52d946ff194039723.tar.gz
gerrit: Don't let anyone force-push to 'master'
Previously, Mirroring Tools (Lorry) could force-push anywhere. This is so that personal branches are kept in sync between git.baserock.org and gerrit.baserock.org. Since users may force-push to their personal branches, it's necessary to allow force-pushes. But nobody should force 'master', and I have a feeling that this is causing an issue we are seeing where Gerrit says that it has merged something, but there is no sign of the merge in 'master'. Change-Id: I80bc4eace46470ffa7f3da185fcc1c1f228cda71
-rw-r--r--baserock_gerrit/All-Projects/project.config6
1 files changed, 6 insertions, 0 deletions
diff --git a/baserock_gerrit/All-Projects/project.config b/baserock_gerrit/All-Projects/project.config
index d3e8b472..e1c44040 100644
--- a/baserock_gerrit/All-Projects/project.config
+++ b/baserock_gerrit/All-Projects/project.config
@@ -66,6 +66,12 @@
create = group Mirroring Tools
forgeAuthor = group Mirroring Tools
forgeCommitter = group Mirroring Tools
+ push = group Mirroring Tools
+
+# Allow Lorry to force-push to personal branches, but don't ever let
+# it force-push to master as this may undo merges that Gerrit just did
+# and really confuse things.
+[access "^refs/heads/(?!master$)"]
push = +force group Mirroring Tools
[access "refs/tags/*"]