| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Antibody is meant to audit reviews for the Chromium project. | 5 """Antibody is meant to audit reviews for the Chromium project. |
| 6 | 6 |
| 7 Example invocation: [TBD] | 7 Example invocation: [TBD] |
| 8 ./run.py infra.tools.antibody <arguments> | 8 ./run.py infra.tools.antibody <arguments> |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 for review_url in git_commits_with_review_urls: | 58 for review_url in git_commits_with_review_urls: |
| 59 # cannot get access into chromereview.googleplex.com | 59 # cannot get access into chromereview.googleplex.com |
| 60 if 'chromereviews.googleplex' not in review_url: | 60 if 'chromereviews.googleplex' not in review_url: |
| 61 code_review_parse.add_rietveld_data_to_review(review_url, cc) | 61 code_review_parse.add_rietveld_data_to_review(review_url, cc) |
| 62 code_review_parse.add_rietveld_data_to_review_people(review_url, cc) | 62 code_review_parse.add_rietveld_data_to_review_people(review_url, cc) |
| 63 csql.commit(connection) | 63 csql.commit(connection) |
| 64 if args.write_html or args.run_antibody: | 64 if args.write_html or args.run_antibody: |
| 65 if not os.path.exists(args.output_dir_path): | 65 if not os.path.exists(args.output_dir_path): |
| 66 os.makedirs(args.output_dir_path) | 66 os.makedirs(args.output_dir_path) |
| 67 suspicious_commits = code_review_parse.get_tbr_no_lgtm(cc) | 67 suspicious_commits = code_review_parse.get_tbr_no_lgtm(cc) |
| 68 antibody.generate_stats_files(cc, args.output_dir_path) |
| 68 gitiles_prefix = antibody.get_gitiles_prefix(checkout) | 69 gitiles_prefix = antibody.get_gitiles_prefix(checkout) |
| 69 if not gitiles_prefix: | 70 if not gitiles_prefix: |
| 70 gitiles_prefix = '' | 71 gitiles_prefix = '' |
| 71 antibody.get_tbr_by_user(suspicious_commits, gitiles_prefix, | 72 antibody.get_tbr_by_user(suspicious_commits, gitiles_prefix, |
| 72 args.output_dir_path) | 73 args.output_dir_path) |
| 73 antibody.generate_antibody_ui(suspicious_commits, gitiles_prefix, | 74 antibody.generate_antibody_ui(suspicious_commits, gitiles_prefix, |
| 74 args.output_dir_path) | 75 args.output_dir_path) |
| 75 | 76 |
| 76 csql.close(connection, cc) | 77 csql.close(connection, cc) |
| 77 | 78 |
| 78 | 79 |
| 79 if __name__ == '__main__': | 80 if __name__ == '__main__': |
| 80 sys.exit(main(sys.argv[1:])) | 81 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |