Skip to content

Instantly share code, notes, and snippets.

@KenDUemura
Last active October 14, 2022 10:51
Show Gist options
  • Save KenDUemura/cae9c7644cba7d0dfa6ffd90a7ea54d8 to your computer and use it in GitHub Desktop.
Save KenDUemura/cae9c7644cba7d0dfa6ffd90a7ea54d8 to your computer and use it in GitHub Desktop.
Multiline review message with python gerritlib
import logging
import gerritlib.gerrit as gerrit
logging.basicConfig(level=logging.DEBUG)
message = """Gerrit review message
Links automatically becomes link http://www.google.com
But newlines need to be doubled
""".replace("\n","\n\n")
g = gerrit.Gerrit('localhost',
'username',
keyfile='/home/username/.ssh/id_rsa.pub')
command = "gerrit review --message '%s' 241884a" % message
g._ssh(command)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment