def get_collaborators(self, repos): if repos: if self.args.verbose: Helpers().print_success("Collecting authors") if self.args.api: [ repo.set_authors( self.repository_collaborators(repo.identifier)) for repo in repos ] else: GitUtils(self.args).set_repos_authors(repos) return True return False
def execute(self): if self.args.repository: Helpers().print_success("Collecting information for {}".format( self.args.repository)) collected = GitUtils(self.args).get_repo_authors_by_url( self.args.repository) else: collected = self.collect(self.get_collectors()) if not collected: sys.exit(3) Printer(self.args).print(collected) if self.args.file: authors_to_print = collected if not self.args.repository: authors_to_print = Parser( self.args).get_collected_authors(collected) Helpers().write_authors_file(self.args.file, collected) if self.args.run_plugins and not self.args.repository: self.apply_plugins(self.get_plugins(), collected) return collected
def set_authors(self, repos): if self.args.verbose: Helpers().print_success("Collecting authors") return GitUtils(self.args).set_repos_authors(repos)