litl/leeroy — pull request #16 by steveprentice (2013-07-11 16:06:43+00:00)
Title: Add GitHub Enterprise support and API token authentication.

GitHub Enterprise support is supported with the addition of GITHUB_API_BASE in
settings.py (also supported per repo as github_api_base). This option is set to
the API base URL. For github.com, this is "https://api.github.com" and that is
the default setting. For a GitHub Enterprise installation, this can be changed
to point to an internal server. E.g. "http://github.example.com/api/v3".

Some GitHub Enterprise installations operate with a self-signed certificate, so
a GITHUB_VERIFY option is also added. This value should always be set to True
unless GITHUB_API_BASE points to an internal GitHub Enterprise using a self-
signed certificate. This option is also allowed as a repo configuration option.

Also, GITHUB_TOKEN (github_token) was also added to allow authentication via
an API token instead of using a username and password in settings.py. API
tokens can be revoked easily and thus are more secure. Also, in GitHub
Enterprise, additional users cost real money, so being able to use a token
instead of creating a 'bot' user is beneficial.