3 # Copyright 2020 Google Inc.
5 # Use of this source code is governed by a BSD-style license that can be
6 # found in the LICENSE file.
9 """Bulk abandon Gerrit CLs."""
22 def run_abandon_cls(args):
23 """Bulk abandon Gerrit CLs."""
25 go.install(go.INFRA_GO+'/scripts/abandon_gerrit_cls')
26 subprocess.check_call([
28 '--gerrit_instance', args.gerrit_instance,
29 '--abandon_reason', args.abandon_reason,
30 '--last_modified_before_days', str(args.last_modified_before_days),
35 # TODO(rmistry): Instead of attempting to keep these args in sync, defer to
36 # abandon_gerrit_cls for argument parsing.
37 d = 'Helper script for bulk abandoning gerrit CLs'
38 parser = argparse.ArgumentParser(description=d)
40 '--gerrit-instance', '-g', default='https://skia-review.googlesource.com',
41 help='Name of the gerrit instance.')
43 '--abandon-reason', '-a', default='',
44 help='Will be used as reason for abandoning.')
46 '--last-modified-before-days', '-l', default=0,
47 help='If 3 is specified then all CLs that were modified after 3 days ago '
49 args = parser.parse_args()
55 if __name__ == '__main__':