diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-04-01 14:54:49 +0100 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-04-01 17:23:50 +0100 |
commit | fc2eb105834ee33d2010acb0fcf18f72efa63ac5 (patch) | |
tree | 46934886ee9df926cc02c233f2a85ab832f12a9d | |
parent | c7edd49d23fa3f1179c611b52d946ff194039723 (diff) | |
download | infrastructure-fc2eb105834ee33d2010acb0fcf18f72efa63ac5.tar.gz |
gerrit: Allow Lorry to force-push to branches other than 'master'
Commit c7edd49d23fa3f1179c611b52d946ff194039723 tried to express this
using regular expressions but it actually blocked all force-pushes.
I spent some time trying figure out how to get java.util.regex to do the
right thing but I think it's a lost cause.
Instead, it now uses a BLOCK rule to remove the +force permission from
refs/heads/master for Mirroring Tools.
Change-Id: Idb4802ed176184168b928f1e3b79061bd3f408f0
-rw-r--r-- | baserock_gerrit/All-Projects/project.config | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/baserock_gerrit/All-Projects/project.config b/baserock_gerrit/All-Projects/project.config index e1c44040..e418ac0b 100644 --- a/baserock_gerrit/All-Projects/project.config +++ b/baserock_gerrit/All-Projects/project.config @@ -66,13 +66,16 @@ create = group Mirroring Tools forgeAuthor = group Mirroring Tools forgeCommitter = group Mirroring Tools - push = group Mirroring Tools + push = +force group Mirroring Tools + -# Allow Lorry to force-push to personal branches, but don't ever let +# We 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/heads/master"] + exclusiveGroupPermissions = push + push = block +force group Mirroring Tools + [access "refs/tags/*"] pushTag = group Release Team |