def upload_to_sql(git_commit_filename, commit_people_filename, cc, git_checkout_path, commits_after_date): # pragma: no cover """Writes suspicious git commits to a Cloud SQL database Args: cc: a cursor for the Cloud SQL connection git_checkout_path(str): path to a local git checkout """ write_to_csv(git_commit_filename, commit_people_filename, cc, git_checkout_path, commits_after_date) csql.write_to_sql_table(cc, commit_people_filename, 'commit_people') csql.write_to_sql_table(cc, git_commit_filename, 'git_commit')
def upload_to_sql(cc, git_checkout_path, review_filename, review_people_filename): # pragma: no cover """Writes review information on suspicious commits to a Cloud SQL database Args: cc: a cursor for the Cloud SQL connection """ LOGGER.debug('Starting upload_to_sql().') write_code_review_data_to_csv(cc, git_checkout_path, review_filename, review_people_filename) csql.write_to_sql_table(cc, review_filename, 'review') csql.write_to_sql_table(cc, review_people_filename, 'review_people') LOGGER.debug('Finished upload_to_sql().')