1
0
Fork 0
mirror of https://gitlab.wikimedia.org/ladsgroup/Phabricator-maintenance-bot synced 2024-11-22 03:52:37 +01:00

gerrit: Add support for non-master branches

Puppet uses "production" branch
This commit is contained in:
Amir Sarabadani 2022-03-03 16:12:54 +01:00
parent 26469ae3bc
commit 89c5d41610

View file

@ -93,9 +93,10 @@ class ShellMixin:
# If we're not automerging, vote V+1 to trigger jenkins (T254070) # If we're not automerging, vote V+1 to trigger jenkins (T254070)
if options.get('message'): if options.get('message'):
per += ',m=' + urllib.parse.quote_plus(options['message']) per += ',m=' + urllib.parse.quote_plus(options['message'])
branch = options.get('branch', 'master')
return ['git', 'push', return ['git', 'push',
gerrit_url(options['repo'], creds['name'], ssh=True), gerrit_url(options['repo'], creds['name'], ssh=True),
'HEAD:refs/for/master' + per] 'HEAD:refs/for/' + branch + per]
class GerritBot(ShellMixin): class GerritBot(ShellMixin):