def fetch_single_github_repo_data(github_user, github_repo, github_repo_address): github_api = GithubAPI(github_user, github_repo) time_stamp = strftime("%Y-%m-%d %H:%M:%S %z", localtime()) repo = github_api.repo() if repo is not None: print '[{0}] github_watcher_count={1}'.format(time_stamp, repo['watchers']) print '[{0}] github_forks_count={1}'.format(time_stamp, repo['forks']) splunk_api = SplunkAPI(splunkgit_settings.splunk_user_name(), splunkgit_settings.splunk_password()) since = splunk_api.time_of_last_updated_issue(github_repo_address) if since is None: since = '1900-01-01T00:00:01Z' all_issues = github_api.issues_since(since) for issue in all_issues : print u'[{0}] github_issue_number={1} github_issue_state="{2}" github_issue_comment_count={3} github_issue_reporter="{4}" github_issue_title="{5}" github_issue_close_time="{6}" github_issue_update_time="{7}" github_issue_creation_time="{8}" repository="{9}"'.format(time_stamp, issue['number'], issue['state'], issue['comments'], issue['user']['login'], issue['title'], issue['closed_at'], issue['updated_at'], issue['created_at'], github_repo_address)
def fetch_single_github_repo_data(github_user, github_repo, github_repo_address): github_api = GithubAPI(github_user, github_repo) time_stamp = strftime("%Y-%m-%d %H:%M:%S %z", localtime()) repo = github_api.repo() if repo is not None: print '[{0}] github_watcher_count={1}'.format(time_stamp, repo['watchers']) print '[{0}] github_forks_count={1}'.format(time_stamp, repo['forks']) splunk_api = SplunkAPI(splunkgit_settings.splunk_user_name(), splunkgit_settings.splunk_password()) since = splunk_api.time_of_last_updated_issue(github_repo_address) if since is None: since = '1900-01-01T00:00:01Z' all_issues = github_api.issues_since(since) for issue in all_issues: print u'[{0}] github_issue_number={1} github_issue_state="{2}" github_issue_comment_count={3} github_issue_reporter="{4}" github_issue_title="{5}" github_issue_close_time="{6}" github_issue_update_time="{7}" github_issue_creation_time="{8}" repository="{9}"'.format( time_stamp, issue['number'], issue['state'], issue['comments'], issue['user']['login'], issue['title'], issue['closed_at'], issue['updated_at'], issue['created_at'], github_repo_address)
def _get_total_fork_count_for_public_fork(self, fork): github_user = fork['owner']['login'] github_fork = fork['name'] github_api = GithubAPI(github_user, github_fork) return 1 + self._count_forks_in_all_depths_on_single_thread(github_api.forks())