mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-06 13:38:01 +00:00
Bump deps
This commit is contained in:
15
vendor/github.com/google/go-github/github/repos_projects.go
generated
vendored
15
vendor/github.com/google/go-github/github/repos_projects.go
generated
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user