A tool for analysis of an organization as well as repositories
For calculating score of all members of any github organisation and top contributors of all repositories.
You can use this application easily just by changing the following credentials..
This project uses .env
. To configure, simply make a file named .env in the root of your project and add the following lines to it.
ORGANIZATION=<Name of the organization as specified in GitHub>
REDIS_URL=<your redis url>
GITHUB_CLIENT_ID=<your-id>
GITHUB_CLIENT_SECRET=<your-secret>
TOKEN=<your-github-personal-access-token>
Clone the repository and add the above credentials.
# Clone the repo
$ git clone https://github.com/GDGVIT/gdginfo-backend.git
# Navigate into it
$ cd gdginfo-backend
# Bootstrap
$ make
$ ./app
$ ./app --with-cache
Uninstall all requirements that were installed while making this project.
$ make clean
Lint the code according to pep8 heuristics. Good for contributing
$ make lint
Generate documentation based on comment descriptions on the APIs. This uses apidoc
and requires npm
.
$ make docs
Algorithm: It uses github api and fetches the information about members, all the repositories in that organization,
members contribution in those repository.
The application scrolls through all the repositories that belong to this organization.
and using that it calculates contribution a particular individual based on his contribution to that repository.
Action | Weightage |
---|---|
stargazers count | 10 |
watchers count | 10 |
forks count | 15 |
contributions | 40 |
d[contributors['login']] += project[1] * 10 + project[2] * 5 +project[3] * 15 + contributors['contributions'] * 40
Caching: When the --with-cache
flag is provided, all responses are served from a cache. This cache is updated daily. This significantly decreases response latency since github api provides only 10 requests per minute.
Go here and create a new github app with redirect URL as <Your base URL>/oauth
. Your base and redirect URL can be localhost also. You’ll get a client ID and client secret from here.
Now go here and create a personal access token with read access to everything. Here youll get your token.
Note
: For heroku, the callback URL should be http
Made with :heart: by DSC VIT