Skip to content

A web app to rank people by contributions to a GitHub organisation.

License

Notifications You must be signed in to change notification settings

CodeChefVIT/github-leaderboard

 
 

Repository files navigation

Codechef-VIT

Office Panel and Github Leaderboard

A web application that shows various useful information for the office, like upcoming events and a leaderboard counting the number of Github commits.

Deploy

Credentials

Either grab the credentials.py file from the TechX Google Drive, or follow the instructions below.

First create a credentials.py in the root directory of the project. The contents of the file look like this:

# Github Token
token = ""

# Calendar
refresh_token = ""
client_id = ""
client_secret = ""

GitHub

The Github token can be obtained from any account with access to ORG_NAME by going to https://github.com/settings/tokens. Make sure to check the repo scope while issuing the token.

Calendar

The calendar fields can be obtained by first registering an app at the Google Developer Console. This will give you the client_id and client_secret.

To obtain a refresh token, add https://developers.google.com/oauthplayground to the list of redirect URI's of your app. Then head over to the Google OAuth Playground, add the https://www.googleapis.com/auth/calendar.readonly in the list of scopes and hit Authorize API.

This needs to be done from a google account that has access to the ORG_NAME calendar. The click the Exchange auth code for tokens button and grab the refresh_token

Running

Execute,

pip install -r requirements.txt

You may have to use system specific package managers to resolve a few dependancies. (For instance, you need to use fedora's package manager to get six.)

Then run,

python app.py

This app uses sticky sessions and a persistant background thread and storage. Use appropriate deployment methods. The default run uses Flask's internal wsgi server. You can use a production ready server like gunicorn with only a single worker thread as well,

gunicorn -w 1 -b 0.0.0.0:80 app:app

License

License

With ❤️ by CodeChef-VIT

About

A web app to rank people by contributions to a GitHub organisation.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 43.5%
  • Python 29.8%
  • CSS 19.7%
  • HTML 7.0%