google/go-github — pull request #132 by sqs (2014-08-30 02:01:17+00:00)
Title: Add PullRequest branch fields Base and Head

This PR adds `base` and `head` fields to the `PullRequest` struct.

Note: When [creating a PR](https://developer.github.com/v3/pulls/#create-a-pull-request), `head` and `base` are strings. But when [listing or getting a PR](https://developer.github.com/v3/pulls/#list-pull-requests), `head` and `base` are objects. So, creating and listing/getting need to use different Go types. My solution was to create a separate type for creating PRs, since that accepts only a limited set of fields. (It does not appear possible to edit a PR's
head or base from the API; see [Update a pull request](https://developer.github.com/v3/pulls/#update-a-pull-request), which lacks those fields).