classroom

https://github.com/education/classroom

Ruby

GitHub Classroom automates repository creation and access control, making it easy for teachers to distribute starter code and collect assignments on GitHub.

GitHubRepository#number_of_commits

The `commits` method paginates to 30 commits.
As an alternative, we fetch the contribution stats for the
top 100 contributors, then sum the commits.
This isn't perfect, but it's better than our current approach which
shows 30 commits for anything with more than 30 commits.

Source | Google | Stack overflow

Edit

git clone [email protected]:education/classroom.git

cd classroom

open app/models/github_repository.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-GitHubRepository-number_of_commits-for-pr


# Commit to git

git add app/models/github_repository.rbgit commit -m "better docs for GitHubRepository#number_of_commits"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-GitHubRepository-number_of_commits-for-pr

hub pull-request


# Celebrate!