kohsuke/github-api — pull request #131 by mocleiri (2014-09-29 16:09:42+00:00)
Title: Modify GitHubBuilder to resolve user credentials from the system environ...

...ment

Using the Jenkins EnvInject or Credentials Binding Plugins its possible to
pass credentials as Environment Variables.

Its useful for Github.connect() to be able to directly read the values of the
login, password and oauth properties from the environment.

This commit modifies the base Github.connect() method to resolve credentials
in two steps:

1. ~/.github credentials file if it exists.
2. login, password or oauth variables from the environment

A further fromEnvironment() method is provided to support
loading from non-standard variable names.

The old Github.connect() method would throw an IOException if the ~/.github file
did not exist. Now it will fail silently instead dropping back to the anonymous
users access level.