skip_class_list = [] if args.skipClassList: if os.path.exists(args.skipClassList): with open(args.skipClassList, 'r') as listFile: data = listFile.read() skip_class_list = data.split('\n') else: print '\033[91mERROR: Path does not exist:' + args.skipClassList print 'Proceeding without skipping any files..\033[37m' if skip_class_list: print skip_class_list if args.repoPath: repo_path = args.repoPath rh = RepoHandler(temp_dir_path=repo_path) elif args.url: repo_url = args.url rh = RepoHandler(repo_url=repo_url) print "***********************************************" print "\033[92mCloning repo...\033[37m" rh.clone_repo() print "\033[92mDone.\033[37m" print "Repo cloned in folder:" + rh.get_path() print "***********************************************\n" if not args.noPrompts: raw_input() num_commits = args.numCommits
def handle(event, context): # try: RepoHandler(event).run()
skip_class_list = [] for arg in cmd_args: param = arg.split('=') if param[0] == 'skipClassList': if os.path.exists(param[1]): with open(param[1], 'r') as listFile: data = listFile.read() skip_class_list = data.split('\n') else: print 'path does not exist' # rh = RepoHandler(repo_url='https://github.com/rometools/rome.git') # print "Cloning repo..." # rh.clone_repo() # print "Done." rh = RepoHandler(temp_dir_path='/home/rohan/courses/wolf/rome') print "Repo cloned in folder:" + rh.get_path() print "Retrieving the list of modified files.." file_name_list = [] valid_file_desc = [] # Get the list of all the recently modified java files which are not tests repo_path = '/'.join([rh.get_path(), 'rome']) for file_desc in rh.get_modified_files(prev_commits=10): if repo_path in file_desc.path: if (file_desc.ext == ".java"): if '/test' not in file_desc.path: