#!/usr/bin/python2 # Copyright 2014 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Add message to codereview issue. This script takes a codereview URL or a codereview issue number as its argument and a (possibly multi-line) message on stdin. It then calls `git cl upload` to append the message to the given codereview issue. Usage: echo MESSAGE | %prog -c CHECKOUT_PATH CODEREVIEW_ISSUE or: cd /path/to/git/checkout %prog CODEREVIEW_ISSUE < 1: option_parser.error('Extra arguments.') if len(arguments) != 1: option_parser.error('Missing Codereview URL.') message = sys.stdin.read() add_codereview_message(arguments[0], message, options.checkout_path, options.skip_cl_upload, options.verbose, options.reviewers, options.cc) if __name__ == '__main__': main(sys.argv[1:])