Update github scopes according to https://developer.github.com/v3/oauth/#scopes
Allow pullRequest.getHead().getRepository().getCommit(headSha1) to work

The wrong .wrap method was used for pull requests initialized by state
(GHRepository.getPullReqests).

The wrong wrap call was introduced in 9fd34aec7fe9fa1359418c92b0a14526f837a4a4

This commit sets it back to the .wrapUp method which makes sure the pull request
substructure has the repo object set properly.

Without this change a NullPointerException is thrown on the last line of this
code because the repo object inside of the remoteRepository object is null:

GHRepository repo = github.getRepository(targetRepository);

List<GHPullRequest> openPullRequests = repo.getPullRequests(GHIssueState.OPEN);

for (GHPullRequest pullRequest : openPullRequests) {

    GHCommitPointer head = pullRequest.getHead();

	GHRepository remoteRepository = head.getRepository();

	String commitId = head.getSha();

	GHCommit headCommit = remoteRepository.getCommit(commitId);
Merge pull request #129 from mocleiri/fix-pull-request-remote-repo-get-commit

Allow pullRequest.getHead().getRepository().getCommit(headSha1) to work
Merge pull request #128 from ndeloof/patch-1

Update github scopes according to https://developer.github.com/v3/oauth/#scopes
Modify GitHubBuilder to resolve user credentials from the system environment

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 directly 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.

Added new unit tests into GitHubTest.
Add GHCompare.getFiles() method to be able to see the precise files changed.

There is a file field inside of GHCompare but no getter to extract the values
for analysis.

There are contents in that field so I've added a new get method so that they
can be extracted.
Merge pull request #132 from mocleiri/add-getFiles-method-to-GHCompare

Add GHCompare.getFiles() method to be able to see the precise files chan...
Make Github.connect() fail if no credentials are setup

With the previous change if no credentials were defined Github.connect() would
fall back on an anonymous connection.

This commit changes the behaviour back to what it was before so that if there
are no credentials defined in the ~/.github file and no credentials defined
in the environment an IOException is thrown to alert the method caller.

The caller can call Github.connectAnonymously() if that scenario is allowed.

This should handle most cases unless callers are depending on the
FileNotFoundException being specifically thrown instead of an IOException.
Merge pull request #131 from mocleiri/resolve-credentials-from-environment

Modify GitHubBuilder to resolve user credentials from the system environ...
[INFRA-142]

Reworked version of https://github.com/kohsuke/github-api/pull/133/files
Fixed a test regression

Presumably due to the behaviour change on GitHub API?
This test is invalid if ~/.github file exists, which is quite common
[maven-release-plugin] prepare release github-api-1.59
[maven-release-plugin] prepare for next development iteration