Skip to content

arjunrn/ghe-stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github Stats

This script is used to collect statistic on contributions to Github or Github Enterprise repositories. The collected statistics are stored in Postgres databases.

Instructions

  1. Install dependencies
    pipenv install 
  1. Create Schemas
pipenv run python main.py create-schemas
  1. Add Organization and Repositories
pipenv run python main.py add-orgs
pipenv run python main.py add-repos
  1. Fetch the contributions
pipenv run python main.py get-contributions --days 30

The --days options can be used to pass the number of days in the past to consider while saving the contributions.

Note: The Access Token and URL used to acces the API can be passed with the environment variable GITHUB_TOKEN and GITHUB_URL. The connection string for the Postgres database can be passed through the environment variable DB_CONN. Following is a sample use:

    GITHUB_URL=https://github.example.com/api/v3 GITHUB_TOKEN=secrettokenxxxx33 \
    DB_CONN=posgres://ghestats:ghestats@localhost:5432/ghestats pipenv run \
    python main.py add-repos

About

Data scraper for Github API using PyGithub

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages