Giter VIP home page Giter VIP logo

git-challenge's Introduction

Git-Challenge

Build Status

Gamification of Git Contributions for the use of either education or competition.

Idea

Git Challenge was a project I had an idea for when I looked over a GitHub Organisation I was a part of. It is for my old High School Technology Team, the organisation that taught me most of what I knew about programming before I came here. The projects in the GitHub hadn't been touched by anyone except myself and a few other Team Alumni. So I thought I should come up with a way to encourage contributing to these projects, and to teach people git. So I came up with Git-Challenge. A app made to gamify contributing to projects, for any Organisation. Not just this Tech Team. It could be used for CSH, or really any other git organisation with multiple contributors.

Setup

Create a configuration.php based on the configuration-template.php and fill if the corresponding values to set up your application.

After the first run you'll have the proper tables you need in the SQL database. The first Run(s) will be the slowest as it has to track and add every new user it comes across and every commit. GitHub has a 5000 API calls an Hour Limit. By default there is a limit on how many API calls will be made each load. That limit can be modified in the Configuration file. It is reccommended that you start with a low amount (under 2500) so that you don't overwhelm the program. Also it is reccommended to do the initial data pulls before deployment to a public url so that you don't hit the API limit. Small orgs (1000 or less Commits) need not worry about this.

The first few loads will be slow. However once the majority of the Organisation has been scanned, it becomes quicker.

Examples

git-challenge's People

Contributors

devinmatte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

git-challenge's Issues

Events Section

I want a user to be able to create an event, this event would list out prizes, a description, time frame for points, eligible users.
This specifically is what I want to use when going back to Newtown to help encourage git contributions among those students.

Create Legitimate Tests

Test Driven Development

I know I should care more about following the practices I'm taught. So I would like for this to have working tests with both Travis and Circle.

Test only PHP 5.6+ as I do not care about systems running 5.4 and 5.5

Git/GitHub Tutorial Page

Since my original intent was for this program to be used as a sort of education tool. I want to build out a bit of documentation about how to use git/GitHub to allow this to be easily deployed for educational purposes.

Get Travis Builds to Pass

I am new to Travis. But I now have it set up for this project. Now it's just a matter of getting the builds to pass. I'm new to this en-devour and will be looking for help to get this working.

Allow Custom Point Scaling

Allow the user of the application to set their own point scaling:

  • Added
  • Removed
  • Challenges
  • Commits
  • Etc.

Score on display

Currently if you change the weight of a score value, the breakdown gets broken. I should calculate the total score on display instead of storing it in the DB

SQL Data isn't being Stored

SQL Data isn't being stored as it goes down the looping structure.
Tables are created properly and connecting to the database works, however I can't seem to INSERT data.
Look into debugging why this isn't working.

Use "id" as Unique Identifier

In the JSON per commit there is a field for:

"author": {
    "login": "clockfort",
    "id": 57031,
    "avatar_url": "https://avatars1.githubusercontent.com/u/57031?v=3",
    "gravatar_id": "",
    "url": "https://api.github.com/users/clockfort",
    "html_url": "https://github.com/clockfort",
    "followers_url": "https://api.github.com/users/clockfort/followers",
    "following_url": "https://api.github.com/users/clockfort/following{/other_user}",
    "gists_url": "https://api.github.com/users/clockfort/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/clockfort/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/clockfort/subscriptions",
    "organizations_url": "https://api.github.com/users/clockfort/orgs",
    "repos_url": "https://api.github.com/users/clockfort/repos",
    "events_url": "https://api.github.com/users/clockfort/events{/privacy}",
    "received_events_url": "https://api.github.com/users/clockfort/received_events",
    "type": "User",
    "site_admin": false
  }

Use this data instead of Email as the unique identifier

Keep Statistics

Keep Statistics on:

  • How many contributors there are
  • How many repositories have been scanned
  • How many commits have been counted in total
  • Total line count (added/removed)

Create a System for Challenges

Create a system that allows there to be challenges in the database and for challenges to be assigned a point value.
Unlikely to be counted through the API, likely manual point assignment

Deal with Multiple Emails for Users

Some of the Users committing have multiple emails attached to their commits. So it causes them to have multiple entries in the database and splitting their score. I'm curious as to how I could deal with these conflicts non-manually.

Handle Forks

If a Repository is a Fork, don't add new users, just count existing ones from DB

Containerize

I want to get this app to a stage where it's even easier to deploy. With that in mind I want to look into how to containerize this application for deployment on something like Open-Shift.

Allow page to Load before Queries

Right now when you load the page it first runs all the queries before loading up the leaderboard. All the data needed to show the leaderboard is in the database already. So all API calls should be made after all the relevant data has been loaded in. Then on refresh again all the new data will be filled.
This could be solved by simply moving the large PHP loop below the "statistics" section and printing debugging code to a "debugging" section that only shows when debugging is set to ON

Create user profile

Create a user profile to show where all the points have come from towards their placement on the leader-board. Since breakdown mostly does this it would likely show all repositories and the breakdown of those towards the final score.

Use GitHub API to Grab Score Data

Use GitHub API to grab and Store Data

Grab Commits: https://api.github.com/repos/NHSTechTeam/Calendar-Maker/commits/dcad3fb6cce3e22fa940cd4a13369820e6f789ec

Account for Maxing out API Calls

Currently I'm accounting for maxing out API calls by setting a maximum amount of API calls per load. However that doesn't account for someone refreshing twice in an hour with a max cap. Or for setting the max cap past GitHub's max cap.
I want to:

  • Handle "Maxed Out" JSON Returns
  • Keep Track of API calls per Hour in Database and set a Global Cap

Make Methods and split Document up

Create methods to "de-blob" the program, using inheritance or importing
Create Methods:

  • Leaderboard Printouts
  • Statistics

Internal Methods:

  • Add New User
  • Alerts (Success, Info, Warning, Danger)
  • Database Connection and Initialization

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.