From 89c5d41610df2922990b2d2b9313ed7d23c31e86 Mon Sep 17 00:00:00 2001 From: Amir Sarabadani Date: Thu, 3 Mar 2022 16:12:54 +0100 Subject: [PATCH] gerrit: Add support for non-master branches Puppet uses "production" branch --- gerrit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gerrit.py b/gerrit.py index 39d63ee..41efe98 100644 --- a/gerrit.py +++ b/gerrit.py @@ -93,9 +93,10 @@ class ShellMixin: # If we're not automerging, vote V+1 to trigger jenkins (T254070) if options.get('message'): per += ',m=' + urllib.parse.quote_plus(options['message']) + branch = options.get('branch', 'master') return ['git', 'push', gerrit_url(options['repo'], creds['name'], ssh=True), - 'HEAD:refs/for/master' + per] + 'HEAD:refs/for/' + branch + per] class GerritBot(ShellMixin):