Merge v1.2.1-master

Signed-off-by: Emile Vauge <emile@vauge.com>
This commit is contained in:
Emile Vauge 2017-04-11 17:10:46 +02:00
parent a590155b0b
commit aeb17182b4
No known key found for this signature in database
GPG key ID: D808B4C167352E59
396 changed files with 27271 additions and 9969 deletions

View file

@ -5,6 +5,8 @@
package github
import "context"
// IntegrationsService provides access to the installation related functions
// in the GitHub API.
//
@ -14,7 +16,7 @@ type IntegrationsService service
// ListInstallations lists the installations that the current integration has.
//
// GitHub API docs: https://developer.github.com/v3/integrations/#find-installations
func (s *IntegrationsService) ListInstallations(opt *ListOptions) ([]*Installation, *Response, error) {
func (s *IntegrationsService) ListInstallations(ctx context.Context, opt *ListOptions) ([]*Installation, *Response, error) {
u, err := addOptions("integration/installations", opt)
if err != nil {
return nil, nil, err
@ -28,11 +30,11 @@ func (s *IntegrationsService) ListInstallations(opt *ListOptions) ([]*Installati
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeIntegrationPreview)
i := new([]*Installation)
resp, err := s.client.Do(req, &i)
var i []*Installation
resp, err := s.client.Do(ctx, req, &i)
if err != nil {
return nil, resp, err
}
return *i, resp, err
return i, resp, nil
}