shubhsherl / GSoC-Contribution-Leaderboard

This project is now moved to Node.js version and maintained https://github.com/lolimay/GSoC-Contribution-Leaderboard-Node.
https://gsoc.rocket.chat
MIT License
15 stars 16 forks source link
github-commits github-issues github-pull gsoc leaderboard

GSoC Contributions Leaderboard

Rocket.Chat GSoC Contributions Leaderboard screenshot

This project is now moved to Node.js version and maintained here.

A contributions leaderboard for your GSoC organization. Students can track their position on leaderboard based on the PRs, commits, and issues they've completed across the repositories of your organization on Github. Proudly created and maintined by the GSoC 2019 students and the Rocket.chat community.

Benefits

Main Features

Quick Start

Clone the repository to your local machine:

git clone https://github.com/shubhsherl/GSoC-Contribution-Leaderboard.git

Create a python3 virtual environment, activate it and install the required packages

bash
virtualenv venv -p python3
source venv/bin/activate
pip install -r requirements.txt

Create a file name .env in the base directory (alongside manage.py) and Add your Github Auth Token and Organization name in it as following

ORGANIZATION=''
ORGANIZATION_LOGO=''
ORGANIZATION_SITE=''
GITHUB_AUTH_TOKEN=''
DEFAULT_SORT=''
SHOW_RANK=''

Apply database migrations

python manage.py migrate

Finally, run the development server

python manage.py runserver

To run it in background and serve on any port (eg. 3003)

nohup python manage.py runserver 0.0.0.0:3003 &

(For production use follow a proper method for deploying a django app in production)

To create an admin user run

python manage.py createsuperuser

Start the refresh script

Default Sort

The default sort weight only open and merged pulls, for Rocket.Chat we found this worked best for our student community. You can flexibly change this multi-fields sort order by modifying the .env file.

Environment variable to change for default sort order:

DEFAULT_SORT

This variable is used for ranking. It is encoded as:

Value Metrics
1 Open Pulls
2 Merged Pulls
4 Issues

Add the values to combine the metrics. For example: To include Open and Merged Pulls set DEFAULT_SORT=3. To include Merged Pulls and Issues set DEFAULT_SORT=6

Architecture

Running the refresh script

nohup sh refresh.sh &

Initiailization: First steps

Admin levels:

Description of files in Repository

Non-Python files:

filename description
README.md Text file (markdown format) description of the project.
requirement.txt list all packages that needs to be installed for the project.
*.html html file for rendering web-page

Python scripts files:

filename description
model.py Contains the Model for database.
admin.py Contains the Admin Model for Administrator dashboard.
view.py Fetch data from the Github database to a local sqlite3 database.
setting.py Django file for settings of Project.

Contributing

We welcome all contributions for any GSoC orgs, students, or community members. Feel free to contribute bug-fixes at any time. If you plan to contribute new features, utility functions or extensions, please first create an issue and discuss the feature with us. Please help us to improve our documentation, including this page!

Some suggested features to add

Check out issues for labels FEATURE, ENHANCEMENT, or GOOD FIRST ISSUE.