GitHub isn’t open-source, but you can apply your ideas on an (open-source) GitHub-look-alike:
GitLab
A ruby application with its source code here).
They accept suggestions and pull requests

gogs.io (less active than gitea)
Update 2015: you also have other GitHub-look-alike in Go:

gitea.com

GitBLit
