parameters: (review_input)
docstring: Post a review to the gerrit patchset. 'review_input' is a ReviewInput JSON object
    containing the review comments. The gerrit change and patchset are picked up from
    environment variables set by the gerrit jenkins trigger.
docstring_summary: Post a review to the gerrit patchset. 'review_input' is a ReviewInput JSON object
    containing the review comments. The gerrit change and patchset are picked up from
    environment variables set by the gerrit jenkins trigger.
docstring_tokens: Post a review to the gerrit patchset . review_input is a ReviewInput JSON object containing the review comments . The gerrit change and patchset are picked up from environment variables set by the gerrit jenkins trigger .
function: def post_review_to_gerrit(review_input):
    """Post a review to the gerrit patchset. 'review_input' is a ReviewInput JSON object
    containing the review comments. The gerrit change and patchset are picked up from
    environment variables set by the gerrit jenkins trigger."""
    change_num = environ["GERRIT_CHANGE_NUMBER"]
    patch_num = environ["GERRIT_PATCHSET_NUMBER"]
    proc = Popen(["ssh", "-p", environ["GERRIT_PORT"],
                  "impala-public-jenkins@" + environ["GERRIT_HOST"], "gerrit", "review",
                  "--project", environ["GERRIT_PROJECT"], "--json",
                  "{0},{1}".format(change_num, patch_num)], stdin=PIPE)
    proc.communicate(json.dumps(review_input))
    if proc.returncode != 0:
      raise Exception("Error posting review to gerrit.")
function_tokens: def post_review_to_gerrit ( review_input ) : change_num = environ [ "GERRIT_CHANGE_NUMBER" ] patch_num = environ [ "GERRIT_PATCHSET_NUMBER" ] proc = Popen ( [ "ssh" , "-p" , environ [ "GERRIT_PORT" ] , "impala-public-jenkins@" + environ [ "GERRIT_HOST" ] , "gerrit" , "review" , "--project" , environ [ "GERRIT_PROJECT" ] , "--json" , "{0},{1}" . format ( change_num , patch_num ) ] , stdin = PIPE ) proc . communicate ( json . dumps ( review_input ) ) if proc . returncode != 0 : raise Exception ( "Error posting review to gerrit." )