scripts/github_stats.py
def repos(self, repo_type='public', organization='llnl'):
        """
        Retrieves info about the repos of the current organization.
        """
        print 'Getting repos.'
        for repo in self.org_retrieved.iter_repos(type=repo_type):
            #JSON
            json = repo.to_json()
            self.repos_json[repo.name] = json
            #CSV
            temp_repo = my_repo.My_Repo()
            temp_repo.name = repo.full_name
            self.total_repos += 1
            temp_repo.contributors = my_github.get_total_contributors(repo)
            self.total_contributors += temp_repo.contributors
            temp_repo.forks = repo.forks_count
            self.total_forks += temp_repo.forks
            temp_repo.stargazers = repo.stargazers
            self.total_stars += temp_repo.stargazers
            temp_repo.pull_requests_open, temp_repo.pull_requests_closed = \
                my_github.get_pull_reqs(repo)
            temp_repo.pull_requests = (temp_repo.pull_requests_open
                + temp_repo.pull_requests_closed)
            self.total_pull_reqs += temp_repo.pull_requests_open
            self.total_pull_reqs += temp_repo.pull_requests_closed
            self.total_pull_reqs_open += temp_repo.pull_requests_open
            self.total_pull_reqs_closed += temp_repo.pull_requests_closed
            temp_repo.open_issues = repo.open_issues_count
            self.total_open_issues += temp_repo.open_issues
            temp_repo.closed_issues = my_github.get_issues(repo, organization=organization)
            temp_repo.issues = temp_repo.closed_issues + temp_repo.open_issues
            self.total_closed_issues += temp_repo.closed_issues
            self.total_issues += temp_repo.issues
            my_github.get_languages(repo, temp_repo)
            temp_repo.readme = my_github.get_readme(repo)
            #temp_repo.license = my_github.get_license(repo)
            temp_repo.commits = self.get_commits(repo=repo, organization=organization)
            self.total_commits += temp_repo.commits
            self.all_repos.append(temp_repo)
def repos(self, repo_type='public', organization='llnl'):
        print 'Getting repos.'
        for repo in self.org_retrieved.iter_repos(type=repo_type):
            #JSON
            json = repo.to_json()
            self.repos_json[repo.name] = json
            #CSV
            temp_repo = my_repo.My_Repo()
            temp_repo.name = repo.full_name
            self.total_repos += 1
            temp_repo.contributors = my_github.get_total_contributors(repo)
            self.total_contributors += temp_repo.contributors
            temp_repo.forks = repo.forks_count
            self.total_forks += temp_repo.forks
            temp_repo.stargazers = repo.stargazers
            self.total_stars += temp_repo.stargazers
            temp_repo.pull_requests_open, temp_repo.pull_requests_closed = \
                my_github.get_pull_reqs(repo)
            temp_repo.pull_requests = (temp_repo.pull_requests_open
                + temp_repo.pull_requests_closed)
            self.total_pull_reqs += temp_repo.pull_requests_open
            self.total_pull_reqs += temp_repo.pull_requests_closed
            self.total_pull_reqs_open += temp_repo.pull_requests_open
            self.total_pull_reqs_closed += temp_repo.pull_requests_closed
            temp_repo.open_issues = repo.open_issues_count
            self.total_open_issues += temp_repo.open_issues
            temp_repo.closed_issues = my_github.get_issues(repo, organization=organization)
            temp_repo.issues = temp_repo.closed_issues + temp_repo.open_issues
            self.total_closed_issues += temp_repo.closed_issues
            self.total_issues += temp_repo.issues
            my_github.get_languages(repo, temp_repo)
            temp_repo.readme = my_github.get_readme(repo)
            #temp_repo.license = my_github.get_license(repo)
            temp_repo.commits = self.get_commits(repo=repo, organization=organization)
            self.total_commits += temp_repo.commits
            self.all_repos.append(temp_repo)
def repos ( self , repo_type = 'public' , organization = 'llnl' ) : print 'Getting repos.' for repo in self . org_retrieved . iter_repos ( type = repo_type ) : #JSON json = repo . to_json ( ) self . repos_json [ repo . name ] = json #CSV temp_repo = my_repo . My_Repo ( ) temp_repo . name = repo . full_name self . total_repos += 1 temp_repo . contributors = my_github . get_total_contributors ( repo ) self . total_contributors += temp_repo . contributors temp_repo . forks = repo . forks_count self . total_forks += temp_repo . forks temp_repo . stargazers = repo . stargazers self . total_stars += temp_repo . stargazers temp_repo . pull_requests_open , temp_repo . pull_requests_closed = my_github . get_pull_reqs ( repo ) temp_repo . pull_requests = ( temp_repo . pull_requests_open + temp_repo . pull_requests_closed ) self . total_pull_reqs += temp_repo . pull_requests_open self . total_pull_reqs += temp_repo . pull_requests_closed self . total_pull_reqs_open += temp_repo . pull_requests_open self . total_pull_reqs_closed += temp_repo . pull_requests_closed temp_repo . open_issues = repo . open_issues_count self . total_open_issues += temp_repo . open_issues temp_repo . closed_issues = my_github . get_issues ( repo , organization = organization ) temp_repo . issues = temp_repo . closed_issues + temp_repo . open_issues self . total_closed_issues += temp_repo . closed_issues self . total_issues += temp_repo . issues my_github . get_languages ( repo , temp_repo ) temp_repo . readme = my_github . get_readme ( repo ) #temp_repo.license = my_github.get_license(repo) temp_repo . commits = self . get_commits ( repo = repo , organization = organization ) self . total_commits += temp_repo . commits self . all_repos . append ( temp_repo )
Retrieves info about the repos of the current organization.
Retrieves info about the repos of the current organization .