Bump deps

This commit is contained in:
Jeff Mitchell
2017-03-30 20:03:13 -04:00
parent 1f0d9b10b6
commit 7902612773
378 changed files with 61384 additions and 4576 deletions

View File

@@ -1,4 +1,4 @@
// Copyright 2016 The go-github AUTHORS. All rights reserved.
// Copyright 2017 The go-github AUTHORS. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@@ -10,10 +10,19 @@ import (
"fmt"
)
// ProjectListOptions specifies the optional parameters to the
// OrganizationsService.ListProjects and RepositoriesService.ListProjects methods.
type ProjectListOptions struct {
// Indicates the state of the projects to return. Can be either open, closed, or all. Default: open
State string `url:"state,omitempty"`
ListOptions
}
// ListProjects lists the projects for a repo.
//
// GitHub API docs: https://developer.github.com/v3/projects/#list-repository-projects
func (s *RepositoriesService) ListProjects(ctx context.Context, owner, repo string, opt *ListOptions) ([]*Project, *Response, error) {
func (s *RepositoriesService) ListProjects(ctx context.Context, owner, repo string, opt *ProjectListOptions) ([]*Project, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/projects", owner, repo)
u, err := addOptions(u, opt)
if err != nil {
@@ -28,7 +37,7 @@ func (s *RepositoriesService) ListProjects(ctx context.Context, owner, repo stri
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeProjectsPreview)
projects := []*Project{}
var projects []*Project
resp, err := s.client.Do(ctx, req, &projects)
if err != nil {
return nil, resp, err