The GitHub API allows you to Integrate your application with any part of GitHub a collaborative social coding platform.
You can use OAuth to let your users login with their Github Credentials. Manage a Repository. Commit on the Users Behalf, open and merge pull requests as well as pretty much any other feature available on the platform.
Terms of Service are located at https://help.github.com/articles/github-terms-of-service/