aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/google/go-github/github
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/google/go-github/github')
-rw-r--r--vendor/github.com/google/go-github/github/activity.go2
-rw-r--r--vendor/github.com/google/go-github/github/activity_events.go18
-rw-r--r--vendor/github.com/google/go-github/github/activity_notifications.go10
-rw-r--r--vendor/github.com/google/go-github/github/activity_star.go10
-rw-r--r--vendor/github.com/google/go-github/github/activity_watching.go10
-rw-r--r--vendor/github.com/google/go-github/github/admin.go4
-rw-r--r--vendor/github.com/google/go-github/github/authorizations.go20
-rw-r--r--vendor/github.com/google/go-github/github/doc.go4
-rw-r--r--vendor/github.com/google/go-github/github/event_types.go15
-rw-r--r--vendor/github.com/google/go-github/github/gists.go34
-rw-r--r--vendor/github.com/google/go-github/github/gists_comments.go16
-rw-r--r--vendor/github.com/google/go-github/github/git.go2
-rw-r--r--vendor/github.com/google/go-github/github/git_blobs.go2
-rw-r--r--vendor/github.com/google/go-github/github/git_commits.go12
-rw-r--r--vendor/github.com/google/go-github/github/git_refs.go18
-rw-r--r--vendor/github.com/google/go-github/github/git_tags.go6
-rw-r--r--vendor/github.com/google/go-github/github/git_trees.go12
-rw-r--r--vendor/github.com/google/go-github/github/github.go84
-rw-r--r--vendor/github.com/google/go-github/github/gitignore.go8
-rw-r--r--vendor/github.com/google/go-github/github/integration_installation.go2
-rw-r--r--vendor/github.com/google/go-github/github/issues.go44
-rw-r--r--vendor/github.com/google/go-github/github/issues_assignees.go4
-rw-r--r--vendor/github.com/google/go-github/github/issues_comments.go16
-rw-r--r--vendor/github.com/google/go-github/github/issues_events.go8
-rw-r--r--vendor/github.com/google/go-github/github/issues_labels.go18
-rw-r--r--vendor/github.com/google/go-github/github/licenses.go2
-rw-r--r--vendor/github.com/google/go-github/github/migrations_source_import.go16
-rw-r--r--vendor/github.com/google/go-github/github/misc.go6
-rw-r--r--vendor/github.com/google/go-github/github/orgs.go18
-rw-r--r--vendor/github.com/google/go-github/github/orgs_hooks.go2
-rw-r--r--vendor/github.com/google/go-github/github/orgs_members.go26
-rw-r--r--vendor/github.com/google/go-github/github/orgs_teams.go50
-rw-r--r--vendor/github.com/google/go-github/github/projects.go20
-rw-r--r--vendor/github.com/google/go-github/github/pulls.go8
-rw-r--r--vendor/github.com/google/go-github/github/pulls_comments.go6
-rw-r--r--vendor/github.com/google/go-github/github/repos.go30
-rw-r--r--vendor/github.com/google/go-github/github/repos_collaborators.go8
-rw-r--r--vendor/github.com/google/go-github/github/repos_comments.go18
-rw-r--r--vendor/github.com/google/go-github/github/repos_commits.go16
-rw-r--r--vendor/github.com/google/go-github/github/repos_contents.go37
-rw-r--r--vendor/github.com/google/go-github/github/repos_deployments.go9
-rw-r--r--vendor/github.com/google/go-github/github/repos_forks.go8
-rw-r--r--vendor/github.com/google/go-github/github/repos_hooks.go25
-rw-r--r--vendor/github.com/google/go-github/github/repos_invitations.go2
-rw-r--r--vendor/github.com/google/go-github/github/repos_keys.go16
-rw-r--r--vendor/github.com/google/go-github/github/repos_merging.go2
-rw-r--r--vendor/github.com/google/go-github/github/repos_pages.go10
-rw-r--r--vendor/github.com/google/go-github/github/repos_projects.go4
-rw-r--r--vendor/github.com/google/go-github/github/repos_releases.go34
-rw-r--r--vendor/github.com/google/go-github/github/repos_stats.go8
-rw-r--r--vendor/github.com/google/go-github/github/repos_statuses.go20
-rw-r--r--vendor/github.com/google/go-github/github/repos_traffic.go4
-rw-r--r--vendor/github.com/google/go-github/github/search.go12
-rw-r--r--vendor/github.com/google/go-github/github/strings.go2
-rw-r--r--vendor/github.com/google/go-github/github/users.go18
-rw-r--r--vendor/github.com/google/go-github/github/users_emails.go6
-rw-r--r--vendor/github.com/google/go-github/github/users_followers.go16
-rw-r--r--vendor/github.com/google/go-github/github/users_gpg_keys.go6
-rw-r--r--vendor/github.com/google/go-github/github/users_keys.go14
59 files changed, 395 insertions, 463 deletions
diff --git a/vendor/github.com/google/go-github/github/activity.go b/vendor/github.com/google/go-github/github/activity.go
index d719ebb..ad6da2b 100644
--- a/vendor/github.com/google/go-github/github/activity.go
+++ b/vendor/github.com/google/go-github/github/activity.go
@@ -8,7 +8,7 @@ package github
// ActivityService handles communication with the activity related
// methods of the GitHub API.
//
-// GitHub API docs: http://developer.github.com/v3/activity/
+// GitHub API docs: https://developer.github.com/v3/activity/
type ActivityService service
// FeedLink represents a link to a related resource.
diff --git a/vendor/github.com/google/go-github/github/activity_events.go b/vendor/github.com/google/go-github/github/activity_events.go
index 5cdcabe..f749f6d 100644
--- a/vendor/github.com/google/go-github/github/activity_events.go
+++ b/vendor/github.com/google/go-github/github/activity_events.go
@@ -49,8 +49,6 @@ func (e *Event) Payload() (payload interface{}) {
payload = &IntegrationInstallationEvent{}
case "IntegrationInstallationRepositoriesEvent":
payload = &IntegrationInstallationRepositoriesEvent{}
- case "IssueActivityEvent":
- payload = &IssueActivityEvent{}
case "IssueCommentEvent":
payload = &IssueCommentEvent{}
case "IssuesEvent":
@@ -98,7 +96,7 @@ func (e *Event) Payload() (payload interface{}) {
// ListEvents drinks from the firehose of all public events across GitHub.
//
-// GitHub API docs: http://developer.github.com/v3/activity/events/#list-public-events
+// GitHub API docs: https://developer.github.com/v3/activity/events/#list-public-events
func (s *ActivityService) ListEvents(opt *ListOptions) ([]*Event, *Response, error) {
u, err := addOptions("events", opt)
if err != nil {
@@ -121,7 +119,7 @@ func (s *ActivityService) ListEvents(opt *ListOptions) ([]*Event, *Response, err
// ListRepositoryEvents lists events for a repository.
//
-// GitHub API docs: http://developer.github.com/v3/activity/events/#list-repository-events
+// GitHub API docs: https://developer.github.com/v3/activity/events/#list-repository-events
func (s *ActivityService) ListRepositoryEvents(owner, repo string, opt *ListOptions) ([]*Event, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/events", owner, repo)
u, err := addOptions(u, opt)
@@ -145,7 +143,7 @@ func (s *ActivityService) ListRepositoryEvents(owner, repo string, opt *ListOpti
// ListIssueEventsForRepository lists issue events for a repository.
//
-// GitHub API docs: http://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
+// GitHub API docs: https://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
func (s *ActivityService) ListIssueEventsForRepository(owner, repo string, opt *ListOptions) ([]*IssueEvent, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues/events", owner, repo)
u, err := addOptions(u, opt)
@@ -169,7 +167,7 @@ func (s *ActivityService) ListIssueEventsForRepository(owner, repo string, opt *
// ListEventsForRepoNetwork lists public events for a network of repositories.
//
-// GitHub API docs: http://developer.github.com/v3/activity/events/#list-public-events-for-a-network-of-repositories
+// GitHub API docs: https://developer.github.com/v3/activity/events/#list-public-events-for-a-network-of-repositories
func (s *ActivityService) ListEventsForRepoNetwork(owner, repo string, opt *ListOptions) ([]*Event, *Response, error) {
u := fmt.Sprintf("networks/%v/%v/events", owner, repo)
u, err := addOptions(u, opt)
@@ -193,7 +191,7 @@ func (s *ActivityService) ListEventsForRepoNetwork(owner, repo string, opt *List
// ListEventsForOrganization lists public events for an organization.
//
-// GitHub API docs: http://developer.github.com/v3/activity/events/#list-public-events-for-an-organization
+// GitHub API docs: https://developer.github.com/v3/activity/events/#list-public-events-for-an-organization
func (s *ActivityService) ListEventsForOrganization(org string, opt *ListOptions) ([]*Event, *Response, error) {
u := fmt.Sprintf("orgs/%v/events", org)
u, err := addOptions(u, opt)
@@ -218,7 +216,7 @@ func (s *ActivityService) ListEventsForOrganization(org string, opt *ListOptions
// ListEventsPerformedByUser lists the events performed by a user. If publicOnly is
// true, only public events will be returned.
//
-// GitHub API docs: http://developer.github.com/v3/activity/events/#list-events-performed-by-a-user
+// GitHub API docs: https://developer.github.com/v3/activity/events/#list-events-performed-by-a-user
func (s *ActivityService) ListEventsPerformedByUser(user string, publicOnly bool, opt *ListOptions) ([]*Event, *Response, error) {
var u string
if publicOnly {
@@ -248,7 +246,7 @@ func (s *ActivityService) ListEventsPerformedByUser(user string, publicOnly bool
// ListEventsReceivedByUser lists the events received by a user. If publicOnly is
// true, only public events will be returned.
//
-// GitHub API docs: http://developer.github.com/v3/activity/events/#list-events-that-a-user-has-received
+// GitHub API docs: https://developer.github.com/v3/activity/events/#list-events-that-a-user-has-received
func (s *ActivityService) ListEventsReceivedByUser(user string, publicOnly bool, opt *ListOptions) ([]*Event, *Response, error) {
var u string
if publicOnly {
@@ -278,7 +276,7 @@ func (s *ActivityService) ListEventsReceivedByUser(user string, publicOnly bool,
// ListUserEventsForOrganization provides the user’s organization dashboard. You
// must be authenticated as the user to view this.
//
-// GitHub API docs: http://developer.github.com/v3/activity/events/#list-events-for-an-organization
+// GitHub API docs: https://developer.github.com/v3/activity/events/#list-events-for-an-organization
func (s *ActivityService) ListUserEventsForOrganization(org, user string, opt *ListOptions) ([]*Event, *Response, error) {
u := fmt.Sprintf("users/%v/events/orgs/%v", user, org)
u, err := addOptions(u, opt)
diff --git a/vendor/github.com/google/go-github/github/activity_notifications.go b/vendor/github.com/google/go-github/github/activity_notifications.go
index b538a7b..5ae80ad 100644
--- a/vendor/github.com/google/go-github/github/activity_notifications.go
+++ b/vendor/github.com/google/go-github/github/activity_notifications.go
@@ -67,7 +67,7 @@ func (s *ActivityService) ListNotifications(opt *NotificationListOptions) ([]*No
return nil, resp, err
}
- return notifications, resp, err
+ return notifications, resp, nil
}
// ListRepositoryNotifications lists all notifications in a given repository
@@ -92,7 +92,7 @@ func (s *ActivityService) ListRepositoryNotifications(owner, repo string, opt *N
return nil, resp, err
}
- return notifications, resp, err
+ return notifications, resp, nil
}
type markReadOptions struct {
@@ -148,7 +148,7 @@ func (s *ActivityService) GetThread(id string) (*Notification, *Response, error)
return nil, resp, err
}
- return notification, resp, err
+ return notification, resp, nil
}
// MarkThreadRead marks the specified thread as read.
@@ -183,7 +183,7 @@ func (s *ActivityService) GetThreadSubscription(id string) (*Subscription, *Resp
return nil, resp, err
}
- return sub, resp, err
+ return sub, resp, nil
}
// SetThreadSubscription sets the subscription for the specified thread for the
@@ -204,7 +204,7 @@ func (s *ActivityService) SetThreadSubscription(id string, subscription *Subscri
return nil, resp, err
}
- return sub, resp, err
+ return sub, resp, nil
}
// DeleteThreadSubscription deletes the subscription for the specified thread
diff --git a/vendor/github.com/google/go-github/github/activity_star.go b/vendor/github.com/google/go-github/github/activity_star.go
index edf20e8..db9a309 100644
--- a/vendor/github.com/google/go-github/github/activity_star.go
+++ b/vendor/github.com/google/go-github/github/activity_star.go
@@ -49,21 +49,21 @@ func (s *ActivityService) ListStargazers(owner, repo string, opt *ListOptions) (
// ActivityListStarredOptions specifies the optional parameters to the
// ActivityService.ListStarred method.
type ActivityListStarredOptions struct {
- // How to sort the repository list. Possible values are: created, updated,
- // pushed, full_name. Default is "full_name".
+ // How to sort the repository list. Possible values are: created, updated,
+ // pushed, full_name. Default is "full_name".
Sort string `url:"sort,omitempty"`
- // Direction in which to sort repositories. Possible values are: asc, desc.
+ // Direction in which to sort repositories. Possible values are: asc, desc.
// Default is "asc" when sort is "full_name", otherwise default is "desc".
Direction string `url:"direction,omitempty"`
ListOptions
}
-// ListStarred lists all the repos starred by a user. Passing the empty string
+// ListStarred lists all the repos starred by a user. Passing the empty string
// will list the starred repositories for the authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/activity/starring/#list-repositories-being-starred
+// GitHub API docs: https://developer.github.com/v3/activity/starring/#list-repositories-being-starred
func (s *ActivityService) ListStarred(user string, opt *ActivityListStarredOptions) ([]*StarredRepository, *Response, error) {
var u string
if user != "" {
diff --git a/vendor/github.com/google/go-github/github/activity_watching.go b/vendor/github.com/google/go-github/github/activity_watching.go
index ac77657..d8ee72d 100644
--- a/vendor/github.com/google/go-github/github/activity_watching.go
+++ b/vendor/github.com/google/go-github/github/activity_watching.go
@@ -24,7 +24,7 @@ type Subscription struct {
// ListWatchers lists watchers of a particular repo.
//
-// GitHub API Docs: http://developer.github.com/v3/activity/watching/#list-watchers
+// GitHub API Docs: https://developer.github.com/v3/activity/watching/#list-watchers
func (s *ActivityService) ListWatchers(owner, repo string, opt *ListOptions) ([]*User, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/subscribers", owner, repo)
u, err := addOptions(u, opt)
@@ -46,7 +46,7 @@ func (s *ActivityService) ListWatchers(owner, repo string, opt *ListOptions) ([]
return watchers, resp, nil
}
-// ListWatched lists the repositories the specified user is watching. Passing
+// ListWatched lists the repositories the specified user is watching. Passing
// the empty string will fetch watched repos for the authenticated user.
//
// GitHub API Docs: https://developer.github.com/v3/activity/watching/#list-repositories-being-watched
@@ -77,7 +77,7 @@ func (s *ActivityService) ListWatched(user string, opt *ListOptions) ([]*Reposit
}
// GetRepositorySubscription returns the subscription for the specified
-// repository for the authenticated user. If the authenticated user is not
+// repository for the authenticated user. If the authenticated user is not
// watching the repository, a nil Subscription is returned.
//
// GitHub API Docs: https://developer.github.com/v3/activity/watching/#get-a-repository-subscription
@@ -97,7 +97,7 @@ func (s *ActivityService) GetRepositorySubscription(owner, repo string) (*Subscr
return nil, resp, err
}
- return sub, resp, err
+ return sub, resp, nil
}
// SetRepositorySubscription sets the subscription for the specified repository
@@ -122,7 +122,7 @@ func (s *ActivityService) SetRepositorySubscription(owner, repo string, subscrip
return nil, resp, err
}
- return sub, resp, err
+ return sub, resp, nil
}
// DeleteRepositorySubscription deletes the subscription for the specified
diff --git a/vendor/github.com/google/go-github/github/admin.go b/vendor/github.com/google/go-github/github/admin.go
index 44d7a9f..f77b2a2 100644
--- a/vendor/github.com/google/go-github/github/admin.go
+++ b/vendor/github.com/google/go-github/github/admin.go
@@ -75,7 +75,7 @@ func (s *AdminService) UpdateUserLDAPMapping(user string, mapping *UserLDAPMappi
return nil, resp, err
}
- return m, resp, err
+ return m, resp, nil
}
// UpdateTeamLDAPMapping updates the mapping between a GitHub team and an LDAP group.
@@ -94,5 +94,5 @@ func (s *AdminService) UpdateTeamLDAPMapping(team int, mapping *TeamLDAPMapping)
return nil, resp, err
}
- return m, resp, err
+ return m, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/authorizations.go b/vendor/github.com/google/go-github/github/authorizations.go
index 9f2a1ec..b50de5e 100644
--- a/vendor/github.com/google/go-github/github/authorizations.go
+++ b/vendor/github.com/google/go-github/github/authorizations.go
@@ -114,7 +114,7 @@ func (a AuthorizationRequest) String() string {
// AuthorizationUpdateRequest represents a request to update an authorization.
//
// Note that for any one update, you must only provide one of the "scopes"
-// fields. That is, you may provide only one of "Scopes", or "AddScopes", or
+// fields. That is, you may provide only one of "Scopes", or "AddScopes", or
// "RemoveScopes".
//
// GitHub API docs: https://developer.github.com/v3/oauth_authorizations/#update-an-existing-authorization
@@ -170,7 +170,7 @@ func (s *AuthorizationsService) Get(id int) (*Authorization, *Response, error) {
if err != nil {
return nil, resp, err
}
- return a, resp, err
+ return a, resp, nil
}
// Create a new authorization for the specified OAuth application.
@@ -189,7 +189,7 @@ func (s *AuthorizationsService) Create(auth *AuthorizationRequest) (*Authorizati
if err != nil {
return nil, resp, err
}
- return a, resp, err
+ return a, resp, nil
}
// GetOrCreateForApp creates a new authorization for the specified OAuth
@@ -225,7 +225,7 @@ func (s *AuthorizationsService) GetOrCreateForApp(clientID string, auth *Authori
return nil, resp, err
}
- return a, resp, err
+ return a, resp, nil
}
// Edit a single authorization.
@@ -245,7 +245,7 @@ func (s *AuthorizationsService) Edit(id int, auth *AuthorizationUpdateRequest) (
return nil, resp, err
}
- return a, resp, err
+ return a, resp, nil
}
// Delete a single authorization.
@@ -285,7 +285,7 @@ func (s *AuthorizationsService) Check(clientID string, token string) (*Authoriza
return nil, resp, err
}
- return a, resp, err
+ return a, resp, nil
}
// Reset is used to reset a valid OAuth token without end user involvement.
@@ -313,7 +313,7 @@ func (s *AuthorizationsService) Reset(clientID string, token string) (*Authoriza
return nil, resp, err
}
- return a, resp, err
+ return a, resp, nil
}
// Revoke an authorization for an application.
@@ -352,7 +352,7 @@ func (s *AuthorizationsService) ListGrants() ([]*Grant, *Response, error) {
return nil, resp, err
}
- return grants, resp, err
+ return grants, resp, nil
}
// GetGrant gets a single OAuth application grant.
@@ -371,7 +371,7 @@ func (s *AuthorizationsService) GetGrant(id int) (*Grant, *Response, error) {
return nil, resp, err
}
- return grant, resp, err
+ return grant, resp, nil
}
// DeleteGrant deletes an OAuth application grant. Deleting an application's
@@ -408,7 +408,7 @@ func (s *AuthorizationsService) CreateImpersonation(username string, authReq *Au
if err != nil {
return nil, resp, err
}
- return a, resp, err
+ return a, resp, nil
}
// DeleteImpersonation deletes an impersonation OAuth token.
diff --git a/vendor/github.com/google/go-github/github/doc.go b/vendor/github.com/google/go-github/github/doc.go
index 659dd82..28ef1df 100644
--- a/vendor/github.com/google/go-github/github/doc.go
+++ b/vendor/github.com/google/go-github/github/doc.go
@@ -28,7 +28,7 @@ Some API methods have optional parameters that can be passed. For example:
The services of a client divide the API into logical chunks and correspond to
the structure of the GitHub API documentation at
-http://developer.github.com/v3/.
+https://developer.github.com/v3/.
Authentication
@@ -84,7 +84,7 @@ To detect an API rate limit error, you can check if its type is *github.RateLimi
}
Learn more about GitHub rate limiting at
-http://developer.github.com/v3/#rate-limiting.
+https://developer.github.com/v3/#rate-limiting.
Accepted Status
diff --git a/vendor/github.com/google/go-github/github/event_types.go b/vendor/github.com/google/go-github/github/event_types.go
index 6dd7fe3..b98492e 100644
--- a/vendor/github.com/google/go-github/github/event_types.go
+++ b/vendor/github.com/google/go-github/github/event_types.go
@@ -130,19 +130,6 @@ type GollumEvent struct {
Installation *Installation `json:"installation,omitempty"`
}
-// IssueActivityEvent represents the payload delivered by Issue webhook.
-//
-// Deprecated: Use IssuesEvent instead.
-type IssueActivityEvent struct {
- Action *string `json:"action,omitempty"`
- Issue *Issue `json:"issue,omitempty"`
-
- // The following fields are only populated by Webhook events.
- Repo *Repository `json:"repository,omitempty"`
- Sender *User `json:"sender,omitempty"`
- Installation *Installation `json:"installation,omitempty"`
-}
-
// EditChange represents the changes when an issue, pull request, or comment has
// been edited.
type EditChange struct {
@@ -421,7 +408,7 @@ type PullRequestReviewCommentEvent struct {
// PushEvent represents a git push to a GitHub repository.
//
-// GitHub API docs: http://developer.github.com/v3/activity/events/types/#pushevent
+// GitHub API docs: https://developer.github.com/v3/activity/events/types/#pushevent
type PushEvent struct {
PushID *int `json:"push_id,omitempty"`
Head *string `json:"head,omitempty"`
diff --git a/vendor/github.com/google/go-github/github/gists.go b/vendor/github.com/google/go-github/github/gists.go
index 81f55b1..f727f54 100644
--- a/vendor/github.com/google/go-github/github/gists.go
+++ b/vendor/github.com/google/go-github/github/gists.go
@@ -13,7 +13,7 @@ import (
// GistsService handles communication with the Gist related
// methods of the GitHub API.
//
-// GitHub API docs: http://developer.github.com/v3/gists/
+// GitHub API docs: https://developer.github.com/v3/gists/
type GistsService service
// Gist represents a GitHub's gist.
@@ -92,7 +92,7 @@ type GistListOptions struct {
// is authenticated, it will returns all gists for the authenticated
// user.
//
-// GitHub API docs: http://developer.github.com/v3/gists/#list-gists
+// GitHub API docs: https://developer.github.com/v3/gists/#list-gists
func (s *GistsService) List(user string, opt *GistListOptions) ([]*Gist, *Response, error) {
var u string
if user != "" {
@@ -121,7 +121,7 @@ func (s *GistsService) List(user string, opt *GistListOptions) ([]*Gist, *Respon
// ListAll lists all public gists.
//
-// GitHub API docs: http://developer.github.com/v3/gists/#list-gists
+// GitHub API docs: https://developer.github.com/v3/gists/#list-gists
func (s *GistsService) ListAll(opt *GistListOptions) ([]*Gist, *Response, error) {
u, err := addOptions("gists/public", opt)
if err != nil {
@@ -144,7 +144,7 @@ func (s *GistsService) ListAll(opt *GistListOptions) ([]*Gist, *Response, error)
// ListStarred lists starred gists of authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/gists/#list-gists
+// GitHub API docs: https://developer.github.com/v3/gists/#list-gists
func (s *GistsService) ListStarred(opt *GistListOptions) ([]*Gist, *Response, error) {
u, err := addOptions("gists/starred", opt)
if err != nil {
@@ -167,7 +167,7 @@ func (s *GistsService) ListStarred(opt *GistListOptions) ([]*Gist, *Response, er
// Get a single gist.
//
-// GitHub API docs: http://developer.github.com/v3/gists/#get-a-single-gist
+// GitHub API docs: https://developer.github.com/v3/gists/#get-a-single-gist
func (s *GistsService) Get(id string) (*Gist, *Response, error) {
u := fmt.Sprintf("gists/%v", id)
req, err := s.client.NewRequest("GET", u, nil)
@@ -180,7 +180,7 @@ func (s *GistsService) Get(id string) (*Gist, *Response, error) {
return nil, resp, err
}
- return gist, resp, err
+ return gist, resp, nil
}
// GetRevision gets a specific revision of a gist.
@@ -198,12 +198,12 @@ func (s *GistsService) GetRevision(id, sha string) (*Gist, *Response, error) {
return nil, resp, err
}
- return gist, resp, err
+ return gist, resp, nil
}
// Create a gist for authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/gists/#create-a-gist
+// GitHub API docs: https://developer.github.com/v3/gists/#create-a-gist
func (s *GistsService) Create(gist *Gist) (*Gist, *Response, error) {
u := "gists"
req, err := s.client.NewRequest("POST", u, gist)
@@ -216,12 +216,12 @@ func (s *GistsService) Create(gist *Gist) (*Gist, *Response, error) {
return nil, resp, err
}
- return g, resp, err
+ return g, resp, nil
}
// Edit a gist.
//
-// GitHub API docs: http://developer.github.com/v3/gists/#edit-a-gist
+// GitHub API docs: https://developer.github.com/v3/gists/#edit-a-gist
func (s *GistsService) Edit(id string, gist *Gist) (*Gist, *Response, error) {
u := fmt.Sprintf("gists/%v", id)
req, err := s.client.NewRequest("PATCH", u, gist)
@@ -234,7 +234,7 @@ func (s *GistsService) Edit(id string, gist *Gist) (*Gist, *Response, error) {
return nil, resp, err
}
- return g, resp, err
+ return g, resp, nil
}
// ListCommits lists commits of a gist.
@@ -258,7 +258,7 @@ func (s *GistsService) ListCommits(id string) ([]*GistCommit, *Response, error)
// Delete a gist.
//
-// GitHub API docs: http://developer.github.com/v3/gists/#delete-a-gist
+// GitHub API docs: https://developer.github.com/v3/gists/#delete-a-gist
func (s *GistsService) Delete(id string) (*Response, error) {
u := fmt.Sprintf("gists/%v", id)
req, err := s.client.NewRequest("DELETE", u, nil)
@@ -270,7 +270,7 @@ func (s *GistsService) Delete(id string) (*Response, error) {
// Star a gist on behalf of authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/gists/#star-a-gist
+// GitHub API docs: https://developer.github.com/v3/gists/#star-a-gist
func (s *GistsService) Star(id string) (*Response, error) {
u := fmt.Sprintf("gists/%v/star", id)
req, err := s.client.NewRequest("PUT", u, nil)
@@ -282,7 +282,7 @@ func (s *GistsService) Star(id string) (*Response, error) {
// Unstar a gist on a behalf of authenticated user.
//
-// Github API docs: http://developer.github.com/v3/gists/#unstar-a-gist
+// Github API docs: https://developer.github.com/v3/gists/#unstar-a-gist
func (s *GistsService) Unstar(id string) (*Response, error) {
u := fmt.Sprintf("gists/%v/star", id)
req, err := s.client.NewRequest("DELETE", u, nil)
@@ -294,7 +294,7 @@ func (s *GistsService) Unstar(id string) (*Response, error) {
// IsStarred checks if a gist is starred by authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/gists/#check-if-a-gist-is-starred
+// GitHub API docs: https://developer.github.com/v3/gists/#check-if-a-gist-is-starred
func (s *GistsService) IsStarred(id string) (bool, *Response, error) {
u := fmt.Sprintf("gists/%v/star", id)
req, err := s.client.NewRequest("GET", u, nil)
@@ -308,7 +308,7 @@ func (s *GistsService) IsStarred(id string) (bool, *Response, error) {
// Fork a gist.
//
-// GitHub API docs: http://developer.github.com/v3/gists/#fork-a-gist
+// GitHub API docs: https://developer.github.com/v3/gists/#fork-a-gist
func (s *GistsService) Fork(id string) (*Gist, *Response, error) {
u := fmt.Sprintf("gists/%v/forks", id)
req, err := s.client.NewRequest("POST", u, nil)
@@ -322,7 +322,7 @@ func (s *GistsService) Fork(id string) (*Gist, *Response, error) {
return nil, resp, err
}
- return g, resp, err
+ return g, resp, nil
}
// ListForks lists forks of a gist.
diff --git a/vendor/github.com/google/go-github/github/gists_comments.go b/vendor/github.com/google/go-github/github/gists_comments.go
index 71c1c01..84af61c 100644
--- a/vendor/github.com/google/go-github/github/gists_comments.go
+++ b/vendor/github.com/google/go-github/github/gists_comments.go
@@ -25,7 +25,7 @@ func (g GistComment) String() string {
// ListComments lists all comments for a gist.
//
-// GitHub API docs: http://developer.github.com/v3/gists/comments/#list-comments-on-a-gist
+// GitHub API docs: https://developer.github.com/v3/gists/comments/#list-comments-on-a-gist
func (s *GistsService) ListComments(gistID string, opt *ListOptions) ([]*GistComment, *Response, error) {
u := fmt.Sprintf("gists/%v/comments", gistID)
u, err := addOptions(u, opt)
@@ -49,7 +49,7 @@ func (s *GistsService) ListComments(gistID string, opt *ListOptions) ([]*GistCom
// GetComment retrieves a single comment from a gist.
//
-// GitHub API docs: http://developer.github.com/v3/gists/comments/#get-a-single-comment
+// GitHub API docs: https://developer.github.com/v3/gists/comments/#get-a-single-comment
func (s *GistsService) GetComment(gistID string, commentID int) (*GistComment, *Response, error) {
u := fmt.Sprintf("gists/%v/comments/%v", gistID, commentID)
req, err := s.client.NewRequest("GET", u, nil)
@@ -63,12 +63,12 @@ func (s *GistsService) GetComment(gistID string, commentID int) (*GistComment, *
return nil, resp, err
}
- return c, resp, err
+ return c, resp, nil
}
// CreateComment creates a comment for a gist.
//
-// GitHub API docs: http://developer.github.com/v3/gists/comments/#create-a-comment
+// GitHub API docs: https://developer.github.com/v3/gists/comments/#create-a-comment
func (s *GistsService) CreateComment(gistID string, comment *GistComment) (*GistComment, *Response, error) {
u := fmt.Sprintf("gists/%v/comments", gistID)
req, err := s.client.NewRequest("POST", u, comment)
@@ -82,12 +82,12 @@ func (s *GistsService) CreateComment(gistID string, comment *GistComment) (*Gist
return nil, resp, err
}
- return c, resp, err
+ return c, resp, nil
}
// EditComment edits an existing gist comment.
//
-// GitHub API docs: http://developer.github.com/v3/gists/comments/#edit-a-comment
+// GitHub API docs: https://developer.github.com/v3/gists/comments/#edit-a-comment
func (s *GistsService) EditComment(gistID string, commentID int, comment *GistComment) (*GistComment, *Response, error) {
u := fmt.Sprintf("gists/%v/comments/%v", gistID, commentID)
req, err := s.client.NewRequest("PATCH", u, comment)
@@ -101,12 +101,12 @@ func (s *GistsService) EditComment(gistID string, commentID int, comment *GistCo
return nil, resp, err
}
- return c, resp, err
+ return c, resp, nil
}
// DeleteComment deletes a gist comment.
//
-// GitHub API docs: http://developer.github.com/v3/gists/comments/#delete-a-comment
+// GitHub API docs: https://developer.github.com/v3/gists/comments/#delete-a-comment
func (s *GistsService) DeleteComment(gistID string, commentID int) (*Response, error) {
u := fmt.Sprintf("gists/%v/comments/%v", gistID, commentID)
req, err := s.client.NewRequest("DELETE", u, nil)
diff --git a/vendor/github.com/google/go-github/github/git.go b/vendor/github.com/google/go-github/github/git.go
index c934751..1ce4743 100644
--- a/vendor/github.com/google/go-github/github/git.go
+++ b/vendor/github.com/google/go-github/github/git.go
@@ -8,5 +8,5 @@ package github
// GitService handles communication with the git data related
// methods of the GitHub API.
//
-// GitHub API docs: http://developer.github.com/v3/git/
+// GitHub API docs: https://developer.github.com/v3/git/
type GitService service
diff --git a/vendor/github.com/google/go-github/github/git_blobs.go b/vendor/github.com/google/go-github/github/git_blobs.go
index 55148fd..5a46708 100644
--- a/vendor/github.com/google/go-github/github/git_blobs.go
+++ b/vendor/github.com/google/go-github/github/git_blobs.go
@@ -18,7 +18,7 @@ type Blob struct {
// GetBlob fetchs a blob from a repo given a SHA.
//
-// GitHub API docs: http://developer.github.com/v3/git/blobs/#get-a-blob
+// GitHub API docs: https://developer.github.com/v3/git/blobs/#get-a-blob
func (s *GitService) GetBlob(owner string, repo string, sha string) (*Blob, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/git/blobs/%v", owner, repo, sha)
req, err := s.client.NewRequest("GET", u, nil)
diff --git a/vendor/github.com/google/go-github/github/git_commits.go b/vendor/github.com/google/go-github/github/git_commits.go
index 0bcad41..29e0574 100644
--- a/vendor/github.com/google/go-github/github/git_commits.go
+++ b/vendor/github.com/google/go-github/github/git_commits.go
@@ -30,7 +30,7 @@ type Commit struct {
URL *string `json:"url,omitempty"`
Verification *SignatureVerification `json:"verification,omitempty"`
- // CommentCount is the number of GitHub comments on the commit. This
+ // CommentCount is the number of GitHub comments on the commit. This
// is only populated for requests that fetch GitHub data like
// Pulls.ListCommits, Repositories.ListCommits, etc.
CommentCount *int `json:"comment_count,omitempty"`
@@ -40,7 +40,7 @@ func (c Commit) String() string {
return Stringify(c)
}
-// CommitAuthor represents the author or committer of a commit. The commit
+// CommitAuthor represents the author or committer of a commit. The commit
// author may not correspond to a GitHub User.
type CommitAuthor struct {
Date *time.Time `json:"date,omitempty"`
@@ -57,7 +57,7 @@ func (c CommitAuthor) String() string {
// GetCommit fetchs the Commit object for a given SHA.
//
-// GitHub API docs: http://developer.github.com/v3/git/commits/#get-a-commit
+// GitHub API docs: https://developer.github.com/v3/git/commits/#get-a-commit
func (s *GitService) GetCommit(owner string, repo string, sha string) (*Commit, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/git/commits/%v", owner, repo, sha)
req, err := s.client.NewRequest("GET", u, nil)
@@ -74,7 +74,7 @@ func (s *GitService) GetCommit(owner string, repo string, sha string) (*Commit,
return nil, resp, err
}
- return c, resp, err
+ return c, resp, nil
}
// createCommit represents the body of a CreateCommit request.
@@ -92,7 +92,7 @@ type createCommit struct {
// data if omitted. If the commit.Author is omitted, it will be filled in with
// the authenticated user’s information and the current date.
//
-// GitHub API docs: http://developer.github.com/v3/git/commits/#create-a-commit
+// GitHub API docs: https://developer.github.com/v3/git/commits/#create-a-commit
func (s *GitService) CreateCommit(owner string, repo string, commit *Commit) (*Commit, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/git/commits", owner, repo)
@@ -123,5 +123,5 @@ func (s *GitService) CreateCommit(owner string, repo string, commit *Commit) (*C
return nil, resp, err
}
- return c, resp, err
+ return c, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/git_refs.go b/vendor/github.com/google/go-github/github/git_refs.go
index 16cbd6b..bcec615 100644
--- a/vendor/github.com/google/go-github/github/git_refs.go
+++ b/vendor/github.com/google/go-github/github/git_refs.go
@@ -46,7 +46,7 @@ type updateRefRequest struct {
// GetRef fetches the Reference object for a given Git ref.
//
-// GitHub API docs: http://developer.github.com/v3/git/refs/#get-a-reference
+// GitHub API docs: https://developer.github.com/v3/git/refs/#get-a-reference
func (s *GitService) GetRef(owner string, repo string, ref string) (*Reference, *Response, error) {
ref = strings.TrimPrefix(ref, "refs/")
u := fmt.Sprintf("repos/%v/%v/git/refs/%v", owner, repo, ref)
@@ -61,7 +61,7 @@ func (s *GitService) GetRef(owner string, repo string, ref string) (*Reference,
return nil, resp, err
}
- return r, resp, err
+ return r, resp, nil
}
// ReferenceListOptions specifies optional parameters to the
@@ -74,7 +74,7 @@ type ReferenceListOptions struct {
// ListRefs lists all refs in a repository.
//
-// GitHub API docs: http://developer.github.com/v3/git/refs/#get-all-references
+// GitHub API docs: https://developer.github.com/v3/git/refs/#get-all-references
func (s *GitService) ListRefs(owner, repo string, opt *ReferenceListOptions) ([]*Reference, *Response, error) {
var u string
if opt != nil && opt.Type != "" {
@@ -98,12 +98,12 @@ func (s *GitService) ListRefs(owner, repo string, opt *ReferenceListOptions) ([]
return nil, resp, err
}
- return rs, resp, err
+ return rs, resp, nil
}
// CreateRef creates a new ref in a repository.
//
-// GitHub API docs: http://developer.github.com/v3/git/refs/#create-a-reference
+// GitHub API docs: https://developer.github.com/v3/git/refs/#create-a-reference
func (s *GitService) CreateRef(owner string, repo string, ref *Reference) (*Reference, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/git/refs", owner, repo)
req, err := s.client.NewRequest("POST", u, &createRefRequest{
@@ -121,12 +121,12 @@ func (s *GitService) CreateRef(owner string, repo string, ref *Reference) (*Refe
return nil, resp, err
}
- return r, resp, err
+ return r, resp, nil
}
// UpdateRef updates an existing ref in a repository.
//
-// GitHub API docs: http://developer.github.com/v3/git/refs/#update-a-reference
+// GitHub API docs: https://developer.github.com/v3/git/refs/#update-a-reference
func (s *GitService) UpdateRef(owner string, repo string, ref *Reference, force bool) (*Reference, *Response, error) {
refPath := strings.TrimPrefix(*ref.Ref, "refs/")
u := fmt.Sprintf("repos/%v/%v/git/refs/%v", owner, repo, refPath)
@@ -144,12 +144,12 @@ func (s *GitService) UpdateRef(owner string, repo string, ref *Reference, force
return nil, resp, err
}
- return r, resp, err
+ return r, resp, nil
}
// DeleteRef deletes a ref from a repository.
//
-// GitHub API docs: http://developer.github.com/v3/git/refs/#delete-a-reference
+// GitHub API docs: https://developer.github.com/v3/git/refs/#delete-a-reference
func (s *GitService) DeleteRef(owner string, repo string, ref string) (*Response, error) {
ref = strings.TrimPrefix(ref, "refs/")
u := fmt.Sprintf("repos/%v/%v/git/refs/%v", owner, repo, ref)
diff --git a/vendor/github.com/google/go-github/github/git_tags.go b/vendor/github.com/google/go-github/github/git_tags.go
index 01b9cb2..a58858b 100644
--- a/vendor/github.com/google/go-github/github/git_tags.go
+++ b/vendor/github.com/google/go-github/github/git_tags.go
@@ -20,7 +20,7 @@ type Tag struct {
Verification *SignatureVerification `json:"verification,omitempty"`
}
-// createTagRequest represents the body of a CreateTag request. This is mostly
+// createTagRequest represents the body of a CreateTag request. This is mostly
// identical to Tag with the exception that the object SHA and Type are
// top-level fields, rather than being nested inside a JSON object.
type createTagRequest struct {
@@ -33,7 +33,7 @@ type createTagRequest struct {
// GetTag fetchs a tag from a repo given a SHA.
//
-// GitHub API docs: http://developer.github.com/v3/git/tags/#get-a-tag
+// GitHub API docs: https://developer.github.com/v3/git/tags/#get-a-tag
func (s *GitService) GetTag(owner string, repo string, sha string) (*Tag, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/git/tags/%v", owner, repo, sha)
req, err := s.client.NewRequest("GET", u, nil)
@@ -51,7 +51,7 @@ func (s *GitService) GetTag(owner string, repo string, sha string) (*Tag, *Respo
// CreateTag creates a tag object.
//
-// GitHub API docs: http://developer.github.com/v3/git/tags/#create-a-tag-object
+// GitHub API docs: https://developer.github.com/v3/git/tags/#create-a-tag-object
func (s *GitService) CreateTag(owner string, repo string, tag *Tag) (*Tag, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/git/tags", owner, repo)
diff --git a/vendor/github.com/google/go-github/github/git_trees.go b/vendor/github.com/google/go-github/github/git_trees.go
index 9efa4b3..13acfa6 100644
--- a/vendor/github.com/google/go-github/github/git_trees.go
+++ b/vendor/github.com/google/go-github/github/git_trees.go
@@ -17,7 +17,7 @@ func (t Tree) String() string {
return Stringify(t)
}
-// TreeEntry represents the contents of a tree structure. TreeEntry can
+// TreeEntry represents the contents of a tree structure. TreeEntry can
// represent either a blob, a commit (in the case of a submodule), or another
// tree.
type TreeEntry struct {
@@ -35,7 +35,7 @@ func (t TreeEntry) String() string {
// GetTree fetches the Tree object for a given sha hash from a repository.
//
-// GitHub API docs: http://developer.github.com/v3/git/trees/#get-a-tree
+// GitHub API docs: https://developer.github.com/v3/git/trees/#get-a-tree
func (s *GitService) GetTree(owner string, repo string, sha string, recursive bool) (*Tree, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/git/trees/%v", owner, repo, sha)
if recursive {
@@ -53,7 +53,7 @@ func (s *GitService) GetTree(owner string, repo string, sha string, recursive bo
return nil, resp, err
}
- return t, resp, err
+ return t, resp, nil
}
// createTree represents the body of a CreateTree request.
@@ -62,11 +62,11 @@ type createTree struct {
Entries []TreeEntry `json:"tree"`
}
-// CreateTree creates a new tree in a repository. If both a tree and a nested
+// CreateTree creates a new tree in a repository. If both a tree and a nested
// path modifying that tree are specified, it will overwrite the contents of
// that tree with the new path contents and write a new tree out.
//
-// GitHub API docs: http://developer.github.com/v3/git/trees/#create-a-tree
+// GitHub API docs: https://developer.github.com/v3/git/trees/#create-a-tree
func (s *GitService) CreateTree(owner string, repo string, baseTree string, entries []TreeEntry) (*Tree, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/git/trees", owner, repo)
@@ -85,5 +85,5 @@ func (s *GitService) CreateTree(owner string, repo string, baseTree string, entr
return nil, resp, err
}
- return t, resp, err
+ return t, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/github.go b/vendor/github.com/google/go-github/github/github.go
index a58dbfb..0f3145a 100644
--- a/vendor/github.com/google/go-github/github/github.go
+++ b/vendor/github.com/google/go-github/github/github.go
@@ -24,12 +24,7 @@ import (
)
const (
- // StatusUnprocessableEntity is the status code returned when sending a request with invalid fields.
- StatusUnprocessableEntity = 422
-)
-
-const (
- libraryVersion = "2"
+ libraryVersion = "3"
defaultBaseURL = "https://api.github.com/"
uploadBaseURL = "https://uploads.github.com/"
userAgent = "go-github/" + libraryVersion
@@ -106,8 +101,8 @@ type Client struct {
clientMu sync.Mutex // clientMu protects the client during calls that modify the CheckRedirect func.
client *http.Client // HTTP client used to communicate with the API.
- // Base URL for API requests. Defaults to the public GitHub API, but can be
- // set to a domain endpoint to use with GitHub Enterprise. BaseURL should
+ // Base URL for API requests. Defaults to the public GitHub API, but can be
+ // set to a domain endpoint to use with GitHub Enterprise. BaseURL should
// always be specified with a trailing slash.
BaseURL *url.URL
@@ -119,7 +114,6 @@ type Client struct {
rateMu sync.Mutex
rateLimits [categories]Rate // Rate limits for the client as determined by the most recent API calls.
- mostRecent rateLimitCategory
common service // Reuse a single struct instead of allocating one for each service on the heap.
@@ -178,7 +172,7 @@ type RawOptions struct {
Type RawType
}
-// addOptions adds the parameters in opt as URL query parameters to s. opt
+// addOptions adds the parameters in opt as URL query parameters to s. opt
// must be a struct whose fields may contain "url" tags.
func addOptions(s string, opt interface{}) (string, error) {
v := reflect.ValueOf(opt)
@@ -200,8 +194,8 @@ func addOptions(s string, opt interface{}) (string, error) {
return u.String(), nil
}
-// NewClient returns a new GitHub API client. If a nil httpClient is
-// provided, http.DefaultClient will be used. To use API methods which require
+// NewClient returns a new GitHub API client. If a nil httpClient is
+// provided, http.DefaultClient will be used. To use API methods which require
// authentication, provide an http.Client that will perform the authentication
// for you (such as that provided by the golang.org/x/oauth2 library).
func NewClient(httpClient *http.Client) *Client {
@@ -235,7 +229,7 @@ func NewClient(httpClient *http.Client) *Client {
// NewRequest creates an API request. A relative URL can be provided in urlStr,
// in which case it is resolved relative to the BaseURL of the Client.
-// Relative URLs should always be specified without a preceding slash. If
+// Relative URLs should always be specified without a preceding slash. If
// specified, the value pointed to by body is JSON encoded and included as the
// request body.
func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Request, error) {
@@ -295,14 +289,14 @@ func (c *Client) NewUploadRequest(urlStr string, reader io.Reader, size int64, m
return req, nil
}
-// Response is a GitHub API response. This wraps the standard http.Response
+// Response is a GitHub API response. This wraps the standard http.Response
// returned from GitHub and provides convenient access to things like
// pagination links.
type Response struct {
*http.Response
// These fields provide the page values for paginating through a set of
- // results. Any or all of these may be set to the zero value for
+ // results. Any or all of these may be set to the zero value for
// responses that are not part of a paginated set, or for which there
// are no additional pages.
@@ -383,24 +377,11 @@ func parseRate(r *http.Response) Rate {
return rate
}
-// Rate specifies the current rate limit for the client as determined by the
-// most recent API call. If the client is used in a multi-user application,
-// this rate may not always be up-to-date.
-//
-// Deprecated: Use the Response.Rate returned from most recent API call instead.
-// Call RateLimits() to check the current rate.
-func (c *Client) Rate() Rate {
- c.rateMu.Lock()
- rate := c.rateLimits[c.mostRecent]
- c.rateMu.Unlock()
- return rate
-}
-
-// Do sends an API request and returns the API response. The API response is
+// Do sends an API request and returns the API response. The API response is
// JSON decoded and stored in the value pointed to by v, or returned as an
-// error if an API error has occurred. If v implements the io.Writer
+// error if an API error has occurred. If v implements the io.Writer
// interface, the raw response body will be written to v, without attempting to
-// first decode it. If rate limit is exceeded and reset time is in the future,
+// first decode it. If rate limit is exceeded and reset time is in the future,
// Do returns *RateLimitError immediately without making a network API call.
func (c *Client) Do(req *http.Request, v interface{}) (*Response, error) {
rateLimitCategory := category(req.URL.Path)
@@ -431,7 +412,6 @@ func (c *Client) Do(req *http.Request, v interface{}) (*Response, error) {
c.rateMu.Lock()
c.rateLimits[rateLimitCategory] = response.Rate
- c.mostRecent = rateLimitCategory
c.rateMu.Unlock()
err = CheckResponse(resp)
@@ -485,7 +465,7 @@ func (c *Client) checkRateLimitBeforeDo(req *http.Request, rateLimitCategory rat
/*
An ErrorResponse reports one or more errors caused by an API request.
-GitHub API docs: http://developer.github.com/v3/#client-errors
+GitHub API docs: https://developer.github.com/v3/#client-errors
*/
type ErrorResponse struct {
Response *http.Response // HTTP response that caused this error
@@ -511,7 +491,7 @@ func (r *ErrorResponse) Error() string {
}
// TwoFactorAuthError occurs when using HTTP Basic Authentication for a user
-// that has two-factor authentication enabled. The request can be reattempted
+// that has two-factor authentication enabled. The request can be reattempted
// by providing a one-time password in the request.
type TwoFactorAuthError ErrorResponse
@@ -591,7 +571,7 @@ These are the possible validation error codes:
some resources return this (e.g. github.User.CreateKey()), additional
information is set in the Message field of the Error
-GitHub API docs: http://developer.github.com/v3/#client-errors
+GitHub API docs: https://developer.github.com/v3/#client-errors
*/
type Error struct {
Resource string `json:"resource"` // resource on which the error occurred
@@ -609,7 +589,7 @@ func (e *Error) Error() string {
// present. A response is considered an error if it has a status code outside
// the 200 range or equal to 202 Accepted.
// API error responses are expected to have either no response
-// body, or a JSON response body that maps to ErrorResponse. Any other
+// body, or a JSON response body that maps to ErrorResponse. Any other
// response body will be silently ignored.
//
// The error type will be *RateLimitError for rate limit exceeded errors,
@@ -658,15 +638,15 @@ func CheckResponse(r *http.Response) error {
// parseBoolResponse determines the boolean result from a GitHub API response.
// Several GitHub API methods return boolean responses indicated by the HTTP
// status code in the response (true indicated by a 204, false indicated by a
-// 404). This helper function will determine that result and hide the 404
-// error if present. Any other error will be returned through as-is.
+// 404). This helper function will determine that result and hide the 404
+// error if present. Any other error will be returned through as-is.
func parseBoolResponse(err error) (bool, error) {
if err == nil {
return true, nil
}
if err, ok := err.(*ErrorResponse); ok && err.Response.StatusCode == http.StatusNotFound {
- // Simply false. In this one case, we do not pass the error through.
+ // Simply false. In this one case, we do not pass the error through.
return false, nil
}
@@ -692,15 +672,15 @@ func (r Rate) String() string {
// RateLimits represents the rate limits for the current client.
type RateLimits struct {
- // The rate limit for non-search API requests. Unauthenticated
- // requests are limited to 60 per hour. Authenticated requests are
+ // The rate limit for non-search API requests. Unauthenticated
+ // requests are limited to 60 per hour. Authenticated requests are
// limited to 5,000 per hour.
//
// GitHub API docs: https://developer.github.com/v3/#rate-limiting
Core *Rate `json:"core"`
- // The rate limit for search API requests. Unauthenticated requests
- // are limited to 10 requests per minutes. Authenticated requests are
+ // The rate limit for search API requests. Unauthenticated requests
+ // are limited to 10 requests per minutes. Authenticated requests are
// limited to 30 per minute.
//
// GitHub API docs: https://developer.github.com/v3/search/#rate-limit
@@ -730,18 +710,6 @@ func category(path string) rateLimitCategory {
}
}
-// RateLimit returns the core rate limit for the current client.
-//
-// Deprecated: RateLimit is deprecated, use RateLimits instead.
-func (c *Client) RateLimit() (*Rate, *Response, error) {
- limits, resp, err := c.RateLimits()
- if limits == nil {
- return nil, nil, err
- }
-
- return limits.Core, resp, err
-}
-
// RateLimits returns the rate limits for the current client.
func (c *Client) RateLimits() (*RateLimits, *Response, error) {
req, err := c.NewRequest("GET", "rate_limit", nil)
@@ -768,7 +736,7 @@ func (c *Client) RateLimits() (*RateLimits, *Response, error) {
c.rateMu.Unlock()
}
- return response.Resources, resp, err
+ return response.Resources, resp, nil
}
/*
@@ -784,7 +752,7 @@ that need to use a higher rate limit associated with your OAuth application.
This will append the querystring params client_id=xxx&client_secret=yyy to all
requests.
-See http://developer.github.com/v3/#unauthenticated-rate-limited-requests for
+See https://developer.github.com/v3/#unauthenticated-rate-limited-requests for
more information.
*/
type UnauthenticatedRateLimitedTransport struct {
@@ -838,7 +806,7 @@ func (t *UnauthenticatedRateLimitedTransport) transport() http.RoundTripper {
}
// BasicAuthTransport is an http.RoundTripper that authenticates all requests
-// using HTTP Basic Authentication with the provided username and password. It
+// using HTTP Basic Authentication with the provided username and password. It
// additionally supports users who have two-factor authentication enabled on
// their GitHub account.
type BasicAuthTransport struct {
diff --git a/vendor/github.com/google/go-github/github/gitignore.go b/vendor/github.com/google/go-github/github/gitignore.go
index 3f1f565..396178d 100644
--- a/vendor/github.com/google/go-github/github/gitignore.go
+++ b/vendor/github.com/google/go-github/github/gitignore.go
@@ -10,7 +10,7 @@ import "fmt"
// GitignoresService provides access to the gitignore related functions in the
// GitHub API.
//
-// GitHub API docs: http://developer.github.com/v3/gitignore/
+// GitHub API docs: https://developer.github.com/v3/gitignore/
type GitignoresService service
// Gitignore represents a .gitignore file as returned by the GitHub API.
@@ -25,7 +25,7 @@ func (g Gitignore) String() string {
// List all available Gitignore templates.
//
-// http://developer.github.com/v3/gitignore/#listing-available-templates
+// https://developer.github.com/v3/gitignore/#listing-available-templates
func (s GitignoresService) List() ([]string, *Response, error) {
req, err := s.client.NewRequest("GET", "gitignore/templates", nil)
if err != nil {
@@ -43,7 +43,7 @@ func (s GitignoresService) List() ([]string, *Response, error) {
// Get a Gitignore by name.
//
-// http://developer.github.com/v3/gitignore/#get-a-single-template
+// https://developer.github.com/v3/gitignore/#get-a-single-template
func (s GitignoresService) Get(name string) (*Gitignore, *Response, error) {
u := fmt.Sprintf("gitignore/templates/%v", name)
req, err := s.client.NewRequest("GET", u, nil)
@@ -57,5 +57,5 @@ func (s GitignoresService) Get(name string) (*Gitignore, *Response, error) {
return nil, resp, err
}
- return gitignore, resp, err
+ return gitignore, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/integration_installation.go b/vendor/github.com/google/go-github/github/integration_installation.go
index aa59bfe..b130470 100644
--- a/vendor/github.com/google/go-github/github/integration_installation.go
+++ b/vendor/github.com/google/go-github/github/integration_installation.go
@@ -42,5 +42,5 @@ func (s *IntegrationsService) ListRepos(opt *ListOptions) ([]*Repository, *Respo
return nil, resp, err
}
- return r.Repositories, resp, err
+ return r.Repositories, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/issues.go b/vendor/github.com/google/go-github/github/issues.go
index b14939e..c1997ee 100644
--- a/vendor/github.com/google/go-github/github/issues.go
+++ b/vendor/github.com/google/go-github/github/issues.go
@@ -13,7 +13,7 @@ import (
// IssuesService handles communication with the issue related
// methods of the GitHub API.
//
-// GitHub API docs: http://developer.github.com/v3/issues/
+// GitHub API docs: https://developer.github.com/v3/issues/
type IssuesService service
// Issue represents a GitHub issue on a repository.
@@ -68,22 +68,22 @@ type IssueRequest struct {
// IssueListOptions specifies the optional parameters to the IssuesService.List
// and IssuesService.ListByOrg methods.
type IssueListOptions struct {
- // Filter specifies which issues to list. Possible values are: assigned,
- // created, mentioned, subscribed, all. Default is "assigned".
+ // Filter specifies which issues to list. Possible values are: assigned,
+ // created, mentioned, subscribed, all. Default is "assigned".
Filter string `url:"filter,omitempty"`
- // State filters issues based on their state. Possible values are: open,
- // closed, all. Default is "open".
+ // State filters issues based on their state. Possible values are: open,
+ // closed, all. Default is "open".
State string `url:"state,omitempty"`
// Labels filters issues based on their label.
Labels []string `url:"labels,comma,omitempty"`
- // Sort specifies how to sort issues. Possible values are: created, updated,
- // and comments. Default value is "created".
+ // Sort specifies how to sort issues. Possible values are: created, updated,
+ // and comments. Default value is "created".
Sort string `url:"sort,omitempty"`
- // Direction in which to sort issues. Possible values are: asc, desc.
+ // Direction in which to sort issues. Possible values are: asc, desc.
// Default is "desc".
Direction string `url:"direction,omitempty"`
@@ -102,12 +102,12 @@ type PullRequestLinks struct {
PatchURL *string `json:"patch_url,omitempty"`
}
-// List the issues for the authenticated user. If all is true, list issues
+// List the issues for the authenticated user. If all is true, list issues
// across all the user's visible repositories including owned, member, and
// organization repositories; if false, list only owned and member
// repositories.
//
-// GitHub API docs: http://developer.github.com/v3/issues/#list-issues
+// GitHub API docs: https://developer.github.com/v3/issues/#list-issues
func (s *IssuesService) List(all bool, opt *IssueListOptions) ([]*Issue, *Response, error) {
var u string
if all {
@@ -121,7 +121,7 @@ func (s *IssuesService) List(all bool, opt *IssueListOptions) ([]*Issue, *Respon
// ListByOrg fetches the issues in the specified organization for the
// authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/issues/#list-issues
+// GitHub API docs: https://developer.github.com/v3/issues/#list-issues
func (s *IssuesService) ListByOrg(org string, opt *IssueListOptions) ([]*Issue, *Response, error) {
u := fmt.Sprintf("orgs/%v/issues", org)
return s.listIssues(u, opt)
@@ -153,16 +153,16 @@ func (s *IssuesService) listIssues(u string, opt *IssueListOptions) ([]*Issue, *
// IssueListByRepoOptions specifies the optional parameters to the
// IssuesService.ListByRepo method.
type IssueListByRepoOptions struct {
- // Milestone limits issues for the specified milestone. Possible values are
+ // Milestone limits issues for the specified milestone. Possible values are
// a milestone number, "none" for issues with no milestone, "*" for issues
// with any milestone.
Milestone string `url:"milestone,omitempty"`
- // State filters issues based on their state. Possible values are: open,
- // closed, all. Default is "open".
+ // State filters issues based on their state. Possible values are: open,
+ // closed, all. Default is "open".
State string `url:"state,omitempty"`
- // Assignee filters issues based on their assignee. Possible values are a
+ // Assignee filters issues based on their assignee. Possible values are a
// user name, "none" for issues that are not assigned, "*" for issues with
// any assigned user.
Assignee string `url:"assignee,omitempty"`
@@ -176,11 +176,11 @@ type IssueListByRepoOptions struct {
// Labels filters issues based on their label.
Labels []string `url:"labels,omitempty,comma"`
- // Sort specifies how to sort issues. Possible values are: created, updated,
- // and comments. Default value is "created".
+ // Sort specifies how to sort issues. Possible values are: created, updated,
+ // and comments. Default value is "created".
Sort string `url:"sort,omitempty"`
- // Direction in which to sort issues. Possible values are: asc, desc.
+ // Direction in which to sort issues. Possible values are: asc, desc.
// Default is "desc".
Direction string `url:"direction,omitempty"`
@@ -192,7 +192,7 @@ type IssueListByRepoOptions struct {
// ListByRepo lists the issues for the specified repository.
//
-// GitHub API docs: http://developer.github.com/v3/issues/#list-issues-for-a-repository
+// GitHub API docs: https://developer.github.com/v3/issues/#list-issues-for-a-repository
func (s *IssuesService) ListByRepo(owner string, repo string, opt *IssueListByRepoOptions) ([]*Issue, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues", owner, repo)
u, err := addOptions(u, opt)
@@ -219,7 +219,7 @@ func (s *IssuesService) ListByRepo(owner string, repo string, opt *IssueListByRe
// Get a single issue.
//
-// GitHub API docs: http://developer.github.com/v3/issues/#get-a-single-issue
+// GitHub API docs: https://developer.github.com/v3/issues/#get-a-single-issue
func (s *IssuesService) Get(owner string, repo string, number int) (*Issue, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues/%d", owner, repo, number)
req, err := s.client.NewRequest("GET", u, nil)
@@ -241,7 +241,7 @@ func (s *IssuesService) Get(owner string, repo string, number int) (*Issue, *Res
// Create a new issue on the specified repository.
//
-// GitHub API docs: http://developer.github.com/v3/issues/#create-an-issue
+// GitHub API docs: https://developer.github.com/v3/issues/#create-an-issue
func (s *IssuesService) Create(owner string, repo string, issue *IssueRequest) (*Issue, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues", owner, repo)
req, err := s.client.NewRequest("POST", u, issue)
@@ -260,7 +260,7 @@ func (s *IssuesService) Create(owner string, repo string, issue *IssueRequest) (
// Edit an issue.
//
-// GitHub API docs: http://developer.github.com/v3/issues/#edit-an-issue
+// GitHub API docs: https://developer.github.com/v3/issues/#edit-an-issue
func (s *IssuesService) Edit(owner string, repo string, number int, issue *IssueRequest) (*Issue, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues/%d", owner, repo, number)
req, err := s.client.NewRequest("PATCH", u, issue)
diff --git a/vendor/github.com/google/go-github/github/issues_assignees.go b/vendor/github.com/google/go-github/github/issues_assignees.go
index 1f06102..bdc6a6b 100644
--- a/vendor/github.com/google/go-github/github/issues_assignees.go
+++ b/vendor/github.com/google/go-github/github/issues_assignees.go
@@ -10,7 +10,7 @@ import "fmt"
// ListAssignees fetches all available assignees (owners and collaborators) to
// which issues may be assigned.
//
-// GitHub API docs: http://developer.github.com/v3/issues/assignees/#list-assignees
+// GitHub API docs: https://developer.github.com/v3/issues/assignees/#list-assignees
func (s *IssuesService) ListAssignees(owner, repo string, opt *ListOptions) ([]*User, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/assignees", owner, repo)
u, err := addOptions(u, opt)
@@ -33,7 +33,7 @@ func (s *IssuesService) ListAssignees(owner, repo string, opt *ListOptions) ([]*
// IsAssignee checks if a user is an assignee for the specified repository.
//
-// GitHub API docs: http://developer.github.com/v3/issues/assignees/#check-assignee
+// GitHub API docs: https://developer.github.com/v3/issues/assignees/#check-assignee
func (s *IssuesService) IsAssignee(owner, repo, user string) (bool, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/assignees/%v", owner, repo, user)
req, err := s.client.NewRequest("GET", u, nil)
diff --git a/vendor/github.com/google/go-github/github/issues_comments.go b/vendor/github.com/google/go-github/github/issues_comments.go
index 7d46913..e8a852e 100644
--- a/vendor/github.com/google/go-github/github/issues_comments.go
+++ b/vendor/github.com/google/go-github/github/issues_comments.go
@@ -30,10 +30,10 @@ func (i IssueComment) String() string {
// IssueListCommentsOptions specifies the optional parameters to the
// IssuesService.ListComments method.
type IssueListCommentsOptions struct {
- // Sort specifies how to sort comments. Possible values are: created, updated.
+ // Sort specifies how to sort comments. Possible values are: created, updated.
Sort string `url:"sort,omitempty"`
- // Direction in which to sort comments. Possible values are: asc, desc.
+ // Direction in which to sort comments. Possible values are: asc, desc.
Direction string `url:"direction,omitempty"`
// Since filters comments by time.
@@ -42,10 +42,10 @@ type IssueListCommentsOptions struct {
ListOptions
}
-// ListComments lists all comments on the specified issue. Specifying an issue
+// ListComments lists all comments on the specified issue. Specifying an issue
// number of 0 will return all comments on all issues for the repository.
//
-// GitHub API docs: http://developer.github.com/v3/issues/comments/#list-comments-on-an-issue
+// GitHub API docs: https://developer.github.com/v3/issues/comments/#list-comments-on-an-issue
func (s *IssuesService) ListComments(owner string, repo string, number int, opt *IssueListCommentsOptions) ([]*IssueComment, *Response, error) {
var u string
if number == 0 {
@@ -77,7 +77,7 @@ func (s *IssuesService) ListComments(owner string, repo string, number int, opt
// GetComment fetches the specified issue comment.
//
-// GitHub API docs: http://developer.github.com/v3/issues/comments/#get-a-single-comment
+// GitHub API docs: https://developer.github.com/v3/issues/comments/#get-a-single-comment
func (s *IssuesService) GetComment(owner string, repo string, id int) (*IssueComment, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues/comments/%d", owner, repo, id)
@@ -100,7 +100,7 @@ func (s *IssuesService) GetComment(owner string, repo string, id int) (*IssueCom
// CreateComment creates a new comment on the specified issue.
//
-// GitHub API docs: http://developer.github.com/v3/issues/comments/#create-a-comment
+// GitHub API docs: https://developer.github.com/v3/issues/comments/#create-a-comment
func (s *IssuesService) CreateComment(owner string, repo string, number int, comment *IssueComment) (*IssueComment, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues/%d/comments", owner, repo, number)
req, err := s.client.NewRequest("POST", u, comment)
@@ -118,7 +118,7 @@ func (s *IssuesService) CreateComment(owner string, repo string, number int, com
// EditComment updates an issue comment.
//
-// GitHub API docs: http://developer.github.com/v3/issues/comments/#edit-a-comment
+// GitHub API docs: https://developer.github.com/v3/issues/comments/#edit-a-comment
func (s *IssuesService) EditComment(owner string, repo string, id int, comment *IssueComment) (*IssueComment, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues/comments/%d", owner, repo, id)
req, err := s.client.NewRequest("PATCH", u, comment)
@@ -136,7 +136,7 @@ func (s *IssuesService) EditComment(owner string, repo string, id int, comment *
// DeleteComment deletes an issue comment.
//
-// GitHub API docs: http://developer.github.com/v3/issues/comments/#delete-a-comment
+// GitHub API docs: https://developer.github.com/v3/issues/comments/#delete-a-comment
func (s *IssuesService) DeleteComment(owner string, repo string, id int) (*Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues/comments/%d", owner, repo, id)
req, err := s.client.NewRequest("DELETE", u, nil)
diff --git a/vendor/github.com/google/go-github/github/issues_events.go b/vendor/github.com/google/go-github/github/issues_events.go
index 71cf61a..98f215c 100644
--- a/vendor/github.com/google/go-github/github/issues_events.go
+++ b/vendor/github.com/google/go-github/github/issues_events.go
@@ -18,7 +18,7 @@ type IssueEvent struct {
// The User that generated this event.
Actor *User `json:"actor,omitempty"`
- // Event identifies the actual type of Event that occurred. Possible
+ // Event identifies the actual type of Event that occurred. Possible
// values are:
//
// closed
@@ -91,7 +91,7 @@ func (s *IssuesService) ListIssueEvents(owner, repo string, number int, opt *Lis
return nil, resp, err
}
- return events, resp, err
+ return events, resp, nil
}
// ListRepositoryEvents lists events for the specified repository.
@@ -115,7 +115,7 @@ func (s *IssuesService) ListRepositoryEvents(owner, repo string, opt *ListOption
return nil, resp, err
}
- return events, resp, err
+ return events, resp, nil
}
// GetEvent returns the specified issue event.
@@ -135,7 +135,7 @@ func (s *IssuesService) GetEvent(owner, repo string, id int) (*IssueEvent, *Resp
return nil, resp, err
}
- return event, resp, err
+ return event, resp, nil
}
// Rename contains details for 'renamed' events.
diff --git a/vendor/github.com/google/go-github/github/issues_labels.go b/vendor/github.com/google/go-github/github/issues_labels.go
index 46b2d6e..c9f8c46 100644
--- a/vendor/github.com/google/go-github/github/issues_labels.go
+++ b/vendor/github.com/google/go-github/github/issues_labels.go
@@ -20,7 +20,7 @@ func (l Label) String() string {
// ListLabels lists all labels for a repository.
//
-// GitHub API docs: http://developer.github.com/v3/issues/labels/#list-all-labels-for-this-repository
+// GitHub API docs: https://developer.github.com/v3/issues/labels/#list-all-labels-for-this-repository
func (s *IssuesService) ListLabels(owner string, repo string, opt *ListOptions) ([]*Label, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/labels", owner, repo)
u, err := addOptions(u, opt)
@@ -44,7 +44,7 @@ func (s *IssuesService) ListLabels(owner string, repo string, opt *ListOptions)
// GetLabel gets a single label.
//
-// GitHub API docs: http://developer.github.com/v3/issues/labels/#get-a-single-label
+// GitHub API docs: https://developer.github.com/v3/issues/labels/#get-a-single-label
func (s *IssuesService) GetLabel(owner string, repo string, name string) (*Label, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/labels/%v", owner, repo, name)
req, err := s.client.NewRequest("GET", u, nil)
@@ -63,7 +63,7 @@ func (s *IssuesService) GetLabel(owner string, repo string, name string) (*Label
// CreateLabel creates a new label on the specified repository.
//
-// GitHub API docs: http://developer.github.com/v3/issues/labels/#create-a-label
+// GitHub API docs: https://developer.github.com/v3/issues/labels/#create-a-label
func (s *IssuesService) CreateLabel(owner string, repo string, label *Label) (*Label, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/labels", owner, repo)
req, err := s.client.NewRequest("POST", u, label)
@@ -82,7 +82,7 @@ func (s *IssuesService) CreateLabel(owner string, repo string, label *Label) (*L
// EditLabel edits a label.
//
-// GitHub API docs: http://developer.github.com/v3/issues/labels/#update-a-label
+// GitHub API docs: https://developer.github.com/v3/issues/labels/#update-a-label
func (s *IssuesService) EditLabel(owner string, repo string, name string, label *Label) (*Label, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/labels/%v", owner, repo, name)
req, err := s.client.NewRequest("PATCH", u, label)
@@ -101,7 +101,7 @@ func (s *IssuesService) EditLabel(owner string, repo string, name string, label
// DeleteLabel deletes a label.
//
-// GitHub API docs: http://developer.github.com/v3/issues/labels/#delete-a-label
+// GitHub API docs: https://developer.github.com/v3/issues/labels/#delete-a-label
func (s *IssuesService) DeleteLabel(owner string, repo string, name string) (*Response, error) {
u := fmt.Sprintf("repos/%v/%v/labels/%v", owner, repo, name)
req, err := s.client.NewRequest("DELETE", u, nil)
@@ -156,7 +156,7 @@ func (s *IssuesService) AddLabelsToIssue(owner string, repo string, number int,
// RemoveLabelForIssue removes a label for an issue.
//
-// GitHub API docs: http://developer.github.com/v3/issues/labels/#remove-a-label-from-an-issue
+// GitHub API docs: https://developer.github.com/v3/issues/labels/#remove-a-label-from-an-issue
func (s *IssuesService) RemoveLabelForIssue(owner string, repo string, number int, label string) (*Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues/%d/labels/%v", owner, repo, number, label)
req, err := s.client.NewRequest("DELETE", u, nil)
@@ -168,7 +168,7 @@ func (s *IssuesService) RemoveLabelForIssue(owner string, repo string, number in
// ReplaceLabelsForIssue replaces all labels for an issue.
//
-// GitHub API docs: http://developer.github.com/v3/issues/labels/#replace-all-labels-for-an-issue
+// GitHub API docs: https://developer.github.com/v3/issues/labels/#replace-all-labels-for-an-issue
func (s *IssuesService) ReplaceLabelsForIssue(owner string, repo string, number int, labels []string) ([]*Label, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues/%d/labels", owner, repo, number)
req, err := s.client.NewRequest("PUT", u, labels)
@@ -187,7 +187,7 @@ func (s *IssuesService) ReplaceLabelsForIssue(owner string, repo string, number
// RemoveLabelsForIssue removes all labels for an issue.
//
-// GitHub API docs: http://developer.github.com/v3/issues/labels/#remove-all-labels-from-an-issue
+// GitHub API docs: https://developer.github.com/v3/issues/labels/#remove-all-labels-from-an-issue
func (s *IssuesService) RemoveLabelsForIssue(owner string, repo string, number int) (*Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues/%d/labels", owner, repo, number)
req, err := s.client.NewRequest("DELETE", u, nil)
@@ -199,7 +199,7 @@ func (s *IssuesService) RemoveLabelsForIssue(owner string, repo string, number i
// ListLabelsForMilestone lists labels for every issue in a milestone.
//
-// GitHub API docs: http://developer.github.com/v3/issues/labels/#get-labels-for-every-issue-in-a-milestone
+// GitHub API docs: https://developer.github.com/v3/issues/labels/#get-labels-for-every-issue-in-a-milestone
func (s *IssuesService) ListLabelsForMilestone(owner string, repo string, number int, opt *ListOptions) ([]*Label, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/milestones/%d/labels", owner, repo, number)
u, err := addOptions(u, opt)
diff --git a/vendor/github.com/google/go-github/github/licenses.go b/vendor/github.com/google/go-github/github/licenses.go
index a1fec94..5340e61 100644
--- a/vendor/github.com/google/go-github/github/licenses.go
+++ b/vendor/github.com/google/go-github/github/licenses.go
@@ -96,5 +96,5 @@ func (s *LicensesService) Get(licenseName string) (*License, *Response, error) {
return nil, resp, err
}
- return license, resp, err
+ return license, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/migrations_source_import.go b/vendor/github.com/google/go-github/github/migrations_source_import.go
index 451b13e..d593e40 100644
--- a/vendor/github.com/google/go-github/github/migrations_source_import.go
+++ b/vendor/github.com/google/go-github/github/migrations_source_import.go
@@ -39,7 +39,7 @@ type Import struct {
// repository. To see a list of these files, call LargeFiles.
LargeFilesCount *int `json:"large_files_count,omitempty"`
- // Identifies the current status of an import. An import that does not
+ // Identifies the current status of an import. An import that does not
// have errors will progress through these steps:
//
// detecting - the "detection" step of the import is in progress
@@ -101,7 +101,7 @@ type Import struct {
HumanName *string `json:"human_name,omitempty"`
// When the importer finds several projects or repositories at the
- // provided URLs, this will identify the available choices. Call
+ // provided URLs, this will identify the available choices. Call
// UpdateImport with the selected Import value.
ProjectChoices []Import `json:"project_choices,omitempty"`
}
@@ -160,7 +160,7 @@ func (s *MigrationService) StartImport(owner, repo string, in *Import) (*Import,
return nil, resp, err
}
- return out, resp, err
+ return out, resp, nil
}
// ImportProgress queries for the status and progress of an ongoing repository import.
@@ -182,7 +182,7 @@ func (s *MigrationService) ImportProgress(owner, repo string) (*Import, *Respons
return nil, resp, err
}
- return out, resp, err
+ return out, resp, nil
}
// UpdateImport initiates a repository import.
@@ -204,7 +204,7 @@ func (s *MigrationService) UpdateImport(owner, repo string, in *Import) (*Import
return nil, resp, err
}
- return out, resp, err
+ return out, resp, nil
}
// CommitAuthors gets the authors mapped from the original repository.
@@ -260,11 +260,11 @@ func (s *MigrationService) MapCommitAuthor(owner, repo string, id int, author *S
return nil, resp, err
}
- return out, resp, err
+ return out, resp, nil
}
// SetLFSPreference sets whether imported repositories should use Git LFS for
-// files larger than 100MB. Only the UseLFS field on the provided Import is
+// files larger than 100MB. Only the UseLFS field on the provided Import is
// used.
//
// GitHub API docs: https://developer.github.com/v3/migration/source_imports/#set-git-lfs-preference
@@ -284,7 +284,7 @@ func (s *MigrationService) SetLFSPreference(owner, repo string, in *Import) (*Im
return nil, resp, err
}
- return out, resp, err
+ return out, resp, nil
}
// LargeFiles lists files larger than 100MB found during the import.
diff --git a/vendor/github.com/google/go-github/github/misc.go b/vendor/github.com/google/go-github/github/misc.go
index 89e1501..0cdb3f7 100644
--- a/vendor/github.com/google/go-github/github/misc.go
+++ b/vendor/github.com/google/go-github/github/misc.go
@@ -13,7 +13,7 @@ import (
// MarkdownOptions specifies optional parameters to the Markdown method.
type MarkdownOptions struct {
- // Mode identifies the rendering mode. Possible values are:
+ // Mode identifies the rendering mode. Possible values are:
// markdown - render a document as plain Markdown, just like
// README files are rendered.
//
@@ -25,7 +25,7 @@ type MarkdownOptions struct {
// Default is "markdown".
Mode string
- // Context identifies the repository context. Only taken into account
+ // Context identifies the repository context. Only taken into account
// when rendering as "gfm".
Context string
}
@@ -125,7 +125,7 @@ func (c *Client) APIMeta() (*APIMeta, *Response, error) {
}
// Octocat returns an ASCII art octocat with the specified message in a speech
-// bubble. If message is empty, a random zen phrase is used.
+// bubble. If message is empty, a random zen phrase is used.
func (c *Client) Octocat(message string) (string, *Response, error) {
u := "octocat"
if message != "" {
diff --git a/vendor/github.com/google/go-github/github/orgs.go b/vendor/github.com/google/go-github/github/orgs.go
index 696c2b7..7421605 100644
--- a/vendor/github.com/google/go-github/github/orgs.go
+++ b/vendor/github.com/google/go-github/github/orgs.go
@@ -13,7 +13,7 @@ import (
// OrganizationsService provides access to the organization related functions
// in the GitHub API.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/
+// GitHub API docs: https://developer.github.com/v3/orgs/
type OrganizationsService service
// Organization represents a GitHub organization account.
@@ -57,7 +57,7 @@ func (o Organization) String() string {
return Stringify(o)
}
-// Plan represents the payment plan for an account. See plans at https://github.com/plans.
+// Plan represents the payment plan for an account. See plans at https://github.com/plans.
type Plan struct {
Name *string `json:"name,omitempty"`
Space *int `json:"space,omitempty"`
@@ -101,13 +101,13 @@ func (s *OrganizationsService) ListAll(opt *OrganizationsListOptions) ([]*Organi
if err != nil {
return nil, resp, err
}
- return orgs, resp, err
+ return orgs, resp, nil
}
-// List the organizations for a user. Passing the empty string will list
+// List the organizations for a user. Passing the empty string will list
// organizations for the authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/#list-user-organizations
+// GitHub API docs: https://developer.github.com/v3/orgs/#list-user-organizations
func (s *OrganizationsService) List(user string, opt *ListOptions) ([]*Organization, *Response, error) {
var u string
if user != "" {
@@ -136,7 +136,7 @@ func (s *OrganizationsService) List(user string, opt *ListOptions) ([]*Organizat
// Get fetches an organization by name.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/#get-an-organization
+// GitHub API docs: https://developer.github.com/v3/orgs/#get-an-organization
func (s *OrganizationsService) Get(org string) (*Organization, *Response, error) {
u := fmt.Sprintf("orgs/%v", org)
req, err := s.client.NewRequest("GET", u, nil)
@@ -150,12 +150,12 @@ func (s *OrganizationsService) Get(org string) (*Organization, *Response, error)
return nil, resp, err
}
- return organization, resp, err
+ return organization, resp, nil
}
// Edit an organization.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/#edit-an-organization
+// GitHub API docs: https://developer.github.com/v3/orgs/#edit-an-organization
func (s *OrganizationsService) Edit(name string, org *Organization) (*Organization, *Response, error) {
u := fmt.Sprintf("orgs/%v", name)
req, err := s.client.NewRequest("PATCH", u, org)
@@ -169,5 +169,5 @@ func (s *OrganizationsService) Edit(name string, org *Organization) (*Organizati
return nil, resp, err
}
- return o, resp, err
+ return o, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/orgs_hooks.go b/vendor/github.com/google/go-github/github/orgs_hooks.go
index 4926311..6dc1052 100644
--- a/vendor/github.com/google/go-github/github/orgs_hooks.go
+++ b/vendor/github.com/google/go-github/github/orgs_hooks.go
@@ -62,7 +62,7 @@ func (s *OrganizationsService) CreateHook(org string, hook *Hook) (*Hook, *Respo
return nil, resp, err
}
- return h, resp, err
+ return h, resp, nil
}
// EditHook updates a specified Hook.
diff --git a/vendor/github.com/google/go-github/github/orgs_members.go b/vendor/github.com/google/go-github/github/orgs_members.go
index ea8a358..40dfc56 100644
--- a/vendor/github.com/google/go-github/github/orgs_members.go
+++ b/vendor/github.com/google/go-github/github/orgs_members.go
@@ -48,8 +48,8 @@ type ListMembersOptions struct {
// organization), list only publicly visible members.
PublicOnly bool `url:"-"`
- // Filter members returned in the list. Possible values are:
- // 2fa_disabled, all. Default is "all".
+ // Filter members returned in the list. Possible values are:
+ // 2fa_disabled, all. Default is "all".
Filter string `url:"filter,omitempty"`
// Role filters members returned by their role in the organization.
@@ -64,11 +64,11 @@ type ListMembersOptions struct {
ListOptions
}
-// ListMembers lists the members for an organization. If the authenticated
+// ListMembers lists the members for an organization. If the authenticated
// user is an owner of the organization, this will return both concealed and
// public members, otherwise it will only return public members.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/members/#members-list
+// GitHub API docs: https://developer.github.com/v3/orgs/members/#members-list
func (s *OrganizationsService) ListMembers(org string, opt *ListMembersOptions) ([]*User, *Response, error) {
var u string
if opt != nil && opt.PublicOnly {
@@ -97,7 +97,7 @@ func (s *OrganizationsService) ListMembers(org string, opt *ListMembersOptions)
// IsMember checks if a user is a member of an organization.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/members/#check-membership
+// GitHub API docs: https://developer.github.com/v3/orgs/members/#check-membership
func (s *OrganizationsService) IsMember(org, user string) (bool, *Response, error) {
u := fmt.Sprintf("orgs/%v/members/%v", org, user)
req, err := s.client.NewRequest("GET", u, nil)
@@ -112,7 +112,7 @@ func (s *OrganizationsService) IsMember(org, user string) (bool, *Response, erro
// IsPublicMember checks if a user is a public member of an organization.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/members/#check-public-membership
+// GitHub API docs: https://developer.github.com/v3/orgs/members/#check-public-membership
func (s *OrganizationsService) IsPublicMember(org, user string) (bool, *Response, error) {
u := fmt.Sprintf("orgs/%v/public_members/%v", org, user)
req, err := s.client.NewRequest("GET", u, nil)
@@ -127,7 +127,7 @@ func (s *OrganizationsService) IsPublicMember(org, user string) (bool, *Response
// RemoveMember removes a user from all teams of an organization.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/members/#remove-a-member
+// GitHub API docs: https://developer.github.com/v3/orgs/members/#remove-a-member
func (s *OrganizationsService) RemoveMember(org, user string) (*Response, error) {
u := fmt.Sprintf("orgs/%v/members/%v", org, user)
req, err := s.client.NewRequest("DELETE", u, nil)
@@ -141,7 +141,7 @@ func (s *OrganizationsService) RemoveMember(org, user string) (*Response, error)
// PublicizeMembership publicizes a user's membership in an organization. (A
// user cannot publicize the membership for another user.)
//
-// GitHub API docs: http://developer.github.com/v3/orgs/members/#publicize-a-users-membership
+// GitHub API docs: https://developer.github.com/v3/orgs/members/#publicize-a-users-membership
func (s *OrganizationsService) PublicizeMembership(org, user string) (*Response, error) {
u := fmt.Sprintf("orgs/%v/public_members/%v", org, user)
req, err := s.client.NewRequest("PUT", u, nil)
@@ -154,7 +154,7 @@ func (s *OrganizationsService) PublicizeMembership(org, user string) (*Response,
// ConcealMembership conceals a user's membership in an organization.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/members/#conceal-a-users-membership
+// GitHub API docs: https://developer.github.com/v3/orgs/members/#conceal-a-users-membership
func (s *OrganizationsService) ConcealMembership(org, user string) (*Response, error) {
u := fmt.Sprintf("orgs/%v/public_members/%v", org, user)
req, err := s.client.NewRequest("DELETE", u, nil)
@@ -196,7 +196,7 @@ func (s *OrganizationsService) ListOrgMemberships(opt *ListOrgMembershipsOptions
return nil, resp, err
}
- return memberships, resp, err
+ return memberships, resp, nil
}
// GetOrgMembership gets the membership for a user in a specified organization.
@@ -224,7 +224,7 @@ func (s *OrganizationsService) GetOrgMembership(user, org string) (*Membership,
return nil, resp, err
}
- return membership, resp, err
+ return membership, resp, nil
}
// EditOrgMembership edits the membership for user in specified organization.
@@ -254,10 +254,10 @@ func (s *OrganizationsService) EditOrgMembership(user, org string, membership *M
return nil, resp, err
}
- return m, resp, err
+ return m, resp, nil
}
-// RemoveOrgMembership removes user from the specified organization. If the
+// RemoveOrgMembership removes user from the specified organization. If the
// user has been invited to the organization, this will cancel their invitation.
//
// GitHub API docs: https://developer.github.com/v3/orgs/members/#remove-organization-membership
diff --git a/vendor/github.com/google/go-github/github/orgs_teams.go b/vendor/github.com/google/go-github/github/orgs_teams.go
index ce8cbec..c1818e5 100644
--- a/vendor/github.com/google/go-github/github/orgs_teams.go
+++ b/vendor/github.com/google/go-github/github/orgs_teams.go
@@ -10,7 +10,7 @@ import (
"time"
)
-// Team represents a team within a GitHub organization. Teams are used to
+// Team represents a team within a GitHub organization. Teams are used to
// manage access to an organization's repositories.
type Team struct {
ID *int `json:"id,omitempty"`
@@ -20,9 +20,9 @@ type Team struct {
Slug *string `json:"slug,omitempty"`
// Permission is deprecated when creating or editing a team in an org
- // using the new GitHub permission model. It no longer identifies the
+ // using the new GitHub permission model. It no longer identifies the
// permission a team has on its repos, but only specifies the default
- // permission a repo is initially added with. Avoid confusion by
+ // permission a repo is initially added with. Avoid confusion by
// specifying a permission value when calling AddTeamRepo.
Permission *string `json:"permission,omitempty"`
@@ -61,7 +61,7 @@ func (i Invitation) String() string {
// ListTeams lists all of the teams for an organization.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/teams/#list-teams
+// GitHub API docs: https://developer.github.com/v3/orgs/teams/#list-teams
func (s *OrganizationsService) ListTeams(org string, opt *ListOptions) ([]*Team, *Response, error) {
u := fmt.Sprintf("orgs/%v/teams", org)
u, err := addOptions(u, opt)
@@ -85,7 +85,7 @@ func (s *OrganizationsService) ListTeams(org string, opt *ListOptions) ([]*Team,
// GetTeam fetches a team by ID.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/teams/#get-team
+// GitHub API docs: https://developer.github.com/v3/orgs/teams/#get-team
func (s *OrganizationsService) GetTeam(team int) (*Team, *Response, error) {
u := fmt.Sprintf("teams/%v", team)
req, err := s.client.NewRequest("GET", u, nil)
@@ -99,12 +99,12 @@ func (s *OrganizationsService) GetTeam(team int) (*Team, *Response, error) {
return nil, resp, err
}
- return t, resp, err
+ return t, resp, nil
}
// CreateTeam creates a new team within an organization.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/teams/#create-team
+// GitHub API docs: https://developer.github.com/v3/orgs/teams/#create-team
func (s *OrganizationsService) CreateTeam(org string, team *Team) (*Team, *Response, error) {
u := fmt.Sprintf("orgs/%v/teams", org)
req, err := s.client.NewRequest("POST", u, team)
@@ -118,12 +118,12 @@ func (s *OrganizationsService) CreateTeam(org string, team *Team) (*Team, *Respo
return nil, resp, err
}
- return t, resp, err
+ return t, resp, nil
}
// EditTeam edits a team.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/teams/#edit-team
+// GitHub API docs: https://developer.github.com/v3/orgs/teams/#edit-team
func (s *OrganizationsService) EditTeam(id int, team *Team) (*Team, *Response, error) {
u := fmt.Sprintf("teams/%v", id)
req, err := s.client.NewRequest("PATCH", u, team)
@@ -137,12 +137,12 @@ func (s *OrganizationsService) EditTeam(id int, team *Team) (*Team, *Response, e
return nil, resp, err
}
- return t, resp, err
+ return t, resp, nil
}
// DeleteTeam deletes a team.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/teams/#delete-team
+// GitHub API docs: https://developer.github.com/v3/orgs/teams/#delete-team
func (s *OrganizationsService) DeleteTeam(team int) (*Response, error) {
u := fmt.Sprintf("teams/%v", team)
req, err := s.client.NewRequest("DELETE", u, nil)
@@ -156,8 +156,8 @@ func (s *OrganizationsService) DeleteTeam(team int) (*Response, error) {
// OrganizationListTeamMembersOptions specifies the optional parameters to the
// OrganizationsService.ListTeamMembers method.
type OrganizationListTeamMembersOptions struct {
- // Role filters members returned by their role in the team. Possible
- // values are "all", "member", "maintainer". Default is "all".
+ // Role filters members returned by their role in the team. Possible
+ // values are "all", "member", "maintainer". Default is "all".
Role string `url:"role,omitempty"`
ListOptions
@@ -166,7 +166,7 @@ type OrganizationListTeamMembersOptions struct {
// ListTeamMembers lists all of the users who are members of the specified
// team.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/teams/#list-team-members
+// GitHub API docs: https://developer.github.com/v3/orgs/teams/#list-team-members
func (s *OrganizationsService) ListTeamMembers(team int, opt *OrganizationListTeamMembersOptions) ([]*User, *Response, error) {
u := fmt.Sprintf("teams/%v/members", team)
u, err := addOptions(u, opt)
@@ -190,7 +190,7 @@ func (s *OrganizationsService) ListTeamMembers(team int, opt *OrganizationListTe
// IsTeamMember checks if a user is a member of the specified team.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/teams/#get-team-member
+// GitHub API docs: https://developer.github.com/v3/orgs/teams/#get-team-member
func (s *OrganizationsService) IsTeamMember(team int, user string) (bool, *Response, error) {
u := fmt.Sprintf("teams/%v/members/%v", team, user)
req, err := s.client.NewRequest("GET", u, nil)
@@ -205,7 +205,7 @@ func (s *OrganizationsService) IsTeamMember(team int, user string) (bool, *Respo
// ListTeamRepos lists the repositories that the specified team has access to.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/teams/#list-team-repos
+// GitHub API docs: https://developer.github.com/v3/orgs/teams/#list-team-repos
func (s *OrganizationsService) ListTeamRepos(team int, opt *ListOptions) ([]*Repository, *Response, error) {
u := fmt.Sprintf("teams/%v/repos", team)
u, err := addOptions(u, opt)
@@ -227,7 +227,7 @@ func (s *OrganizationsService) ListTeamRepos(team int, opt *ListOptions) ([]*Rep
return repos, resp, nil
}
-// IsTeamRepo checks if a team manages the specified repository. If the
+// IsTeamRepo checks if a team manages the specified repository. If the
// repository is managed by team, a Repository is returned which includes the
// permissions team has for that repo.
//
@@ -247,7 +247,7 @@ func (s *OrganizationsService) IsTeamRepo(team int, owner string, repo string) (
return nil, resp, err
}
- return repository, resp, err
+ return repository, resp, nil
}
// OrganizationAddTeamRepoOptions specifies the optional parameters to the
@@ -263,11 +263,11 @@ type OrganizationAddTeamRepoOptions struct {
Permission string `json:"permission,omitempty"`
}
-// AddTeamRepo adds a repository to be managed by the specified team. The
+// AddTeamRepo adds a repository to be managed by the specified team. The
// specified repository must be owned by the organization to which the team
// belongs, or a direct fork of a repository owned by the organization.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/teams/#add-team-repo
+// GitHub API docs: https://developer.github.com/v3/orgs/teams/#add-team-repo
func (s *OrganizationsService) AddTeamRepo(team int, owner string, repo string, opt *OrganizationAddTeamRepoOptions) (*Response, error) {
u := fmt.Sprintf("teams/%v/repos/%v/%v", team, owner, repo)
req, err := s.client.NewRequest("PUT", u, opt)
@@ -279,10 +279,10 @@ func (s *OrganizationsService) AddTeamRepo(team int, owner string, repo string,
}
// RemoveTeamRepo removes a repository from being managed by the specified
-// team. Note that this does not delete the repository, it just removes it
+// team. Note that this does not delete the repository, it just removes it
// from the team.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/teams/#remove-team-repo
+// GitHub API docs: https://developer.github.com/v3/orgs/teams/#remove-team-repo
func (s *OrganizationsService) RemoveTeamRepo(team int, owner string, repo string) (*Response, error) {
u := fmt.Sprintf("teams/%v/repos/%v/%v", team, owner, repo)
req, err := s.client.NewRequest("DELETE", u, nil)
@@ -332,13 +332,13 @@ func (s *OrganizationsService) GetTeamMembership(team int, user string) (*Member
return nil, resp, err
}
- return t, resp, err
+ return t, resp, nil
}
// OrganizationAddTeamMembershipOptions does stuff specifies the optional
// parameters to the OrganizationsService.AddTeamMembership method.
type OrganizationAddTeamMembershipOptions struct {
- // Role specifies the role the user should have in the team. Possible
+ // Role specifies the role the user should have in the team. Possible
// values are:
// member - a normal member of the team
// maintainer - a team maintainer. Able to add/remove other team
@@ -380,7 +380,7 @@ func (s *OrganizationsService) AddTeamMembership(team int, user string, opt *Org
return nil, resp, err
}
- return t, resp, err
+ return t, resp, nil
}
// RemoveTeamMembership removes a user from a team.
diff --git a/vendor/github.com/google/go-github/github/projects.go b/vendor/github.com/google/go-github/github/projects.go
index 2330056..766f002 100644
--- a/vendor/github.com/google/go-github/github/projects.go
+++ b/vendor/github.com/google/go-github/github/projects.go
@@ -51,7 +51,7 @@ func (s *ProjectsService) GetProject(id int) (*Project, *Response, error) {
return nil, resp, err
}
- return project, resp, err
+ return project, resp, nil
}
// ProjectOptions specifies the parameters to the
@@ -83,7 +83,7 @@ func (s *ProjectsService) UpdateProject(id int, opt *ProjectOptions) (*Project,
return nil, resp, err
}
- return project, resp, err
+ return project, resp, nil
}
// DeleteProject deletes a GitHub Project from a repository.
@@ -137,7 +137,7 @@ func (s *ProjectsService) ListProjectColumns(projectID int, opt *ListOptions) ([
return nil, resp, err
}
- return columns, resp, err
+ return columns, resp, nil
}
// GetProjectColumn gets a column of a GitHub Project for a repo.
@@ -159,7 +159,7 @@ func (s *ProjectsService) GetProjectColumn(id int) (*ProjectColumn, *Response, e
return nil, resp, err
}
- return column, resp, err
+ return column, resp, nil
}
// ProjectColumnOptions specifies the parameters to the
@@ -189,7 +189,7 @@ func (s *ProjectsService) CreateProjectColumn(projectID int, opt *ProjectColumnO
return nil, resp, err
}
- return column, resp, err
+ return column, resp, nil
}
// UpdateProjectColumn updates a column of a GitHub Project.
@@ -211,7 +211,7 @@ func (s *ProjectsService) UpdateProjectColumn(columnID int, opt *ProjectColumnOp
return nil, resp, err
}
- return column, resp, err
+ return column, resp, nil
}
// DeleteProjectColumn deletes a column from a GitHub Project.
@@ -290,7 +290,7 @@ func (s *ProjectsService) ListProjectCards(columnID int, opt *ListOptions) ([]*P
return nil, resp, err
}
- return cards, resp, err
+ return cards, resp, nil
}
// GetProjectCard gets a card in a column of a GitHub Project.
@@ -312,7 +312,7 @@ func (s *ProjectsService) GetProjectCard(columnID int) (*ProjectCard, *Response,
return nil, resp, err
}
- return card, resp, err
+ return card, resp, nil
}
// ProjectCardOptions specifies the parameters to the
@@ -347,7 +347,7 @@ func (s *ProjectsService) CreateProjectCard(columnID int, opt *ProjectCardOption
return nil, resp, err
}
- return card, resp, err
+ return card, resp, nil
}
// UpdateProjectCard updates a card of a GitHub Project.
@@ -369,7 +369,7 @@ func (s *ProjectsService) UpdateProjectCard(cardID int, opt *ProjectCardOptions)
return nil, resp, err
}
- return card, resp, err
+ return card, resp, nil
}
// DeleteProjectCard deletes a card from a GitHub Project.
diff --git a/vendor/github.com/google/go-github/github/pulls.go b/vendor/github.com/google/go-github/github/pulls.go
index d3a9ae8..5b5667b 100644
--- a/vendor/github.com/google/go-github/github/pulls.go
+++ b/vendor/github.com/google/go-github/github/pulls.go
@@ -14,7 +14,7 @@ import (
// PullRequestsService handles communication with the pull request related
// methods of the GitHub API.
//
-// GitHub API docs: http://developer.github.com/v3/pulls/
+// GitHub API docs: https://developer.github.com/v3/pulls/
type PullRequestsService service
// PullRequest represents a GitHub pull request on a repository.
@@ -69,8 +69,8 @@ type PullRequestBranch struct {
// PullRequestListOptions specifies the optional parameters to the
// PullRequestsService.List method.
type PullRequestListOptions struct {
- // State filters pull requests based on their state. Possible values are:
- // open, closed. Default is "open".
+ // State filters pull requests based on their state. Possible values are:
+ // open, closed. Default is "open".
State string `url:"state,omitempty"`
// Head filters pull requests by head user and branch name in the format of:
@@ -94,7 +94,7 @@ type PullRequestListOptions struct {
// List the pull requests for the specified repository.
//
-// GitHub API docs: http://developer.github.com/v3/pulls/#list-pull-requests
+// GitHub API docs: https://developer.github.com/v3/pulls/#list-pull-requests
func (s *PullRequestsService) List(owner string, repo string, opt *PullRequestListOptions) ([]*PullRequest, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/pulls", owner, repo)
u, err := addOptions(u, opt)
diff --git a/vendor/github.com/google/go-github/github/pulls_comments.go b/vendor/github.com/google/go-github/github/pulls_comments.go
index 51518f0..0595389 100644
--- a/vendor/github.com/google/go-github/github/pulls_comments.go
+++ b/vendor/github.com/google/go-github/github/pulls_comments.go
@@ -37,10 +37,10 @@ func (p PullRequestComment) String() string {
// PullRequestListCommentsOptions specifies the optional parameters to the
// PullRequestsService.ListComments method.
type PullRequestListCommentsOptions struct {
- // Sort specifies how to sort comments. Possible values are: created, updated.
+ // Sort specifies how to sort comments. Possible values are: created, updated.
Sort string `url:"sort,omitempty"`
- // Direction in which to sort comments. Possible values are: asc, desc.
+ // Direction in which to sort comments. Possible values are: asc, desc.
Direction string `url:"direction,omitempty"`
// Since filters comments by time.
@@ -49,7 +49,7 @@ type PullRequestListCommentsOptions struct {
ListOptions
}
-// ListComments lists all comments on the specified pull request. Specifying a
+// ListComments lists all comments on the specified pull request. Specifying a
// pull request number of 0 will return all comments on all pull requests for
// the repository.
//
diff --git a/vendor/github.com/google/go-github/github/repos.go b/vendor/github.com/google/go-github/github/repos.go
index 019a731..58d27f1 100644
--- a/vendor/github.com/google/go-github/github/repos.go
+++ b/vendor/github.com/google/go-github/github/repos.go
@@ -13,7 +13,7 @@ import (
// RepositoriesService handles communication with the repository related
// methods of the GitHub API.
//
-// GitHub API docs: http://developer.github.com/v3/repos/
+// GitHub API docs: https://developer.github.com/v3/repos/
type RepositoriesService service
// Repository represents a GitHub repository.
@@ -151,10 +151,10 @@ type RepositoryListOptions struct {
ListOptions
}
-// List the repositories for a user. Passing the empty string will list
+// List the repositories for a user. Passing the empty string will list
// repositories for the authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/repos/#list-user-repositories
+// GitHub API docs: https://developer.github.com/v3/repos/#list-user-repositories
func (s *RepositoriesService) List(user string, opt *RepositoryListOptions) ([]*Repository, *Response, error) {
var u string
if user != "" {
@@ -187,8 +187,8 @@ func (s *RepositoriesService) List(user string, opt *RepositoryListOptions) ([]*
// RepositoryListByOrgOptions specifies the optional parameters to the
// RepositoriesService.ListByOrg method.
type RepositoryListByOrgOptions struct {
- // Type of repositories to list. Possible values are: all, public, private,
- // forks, sources, member. Default is "all".
+ // Type of repositories to list. Possible values are: all, public, private,
+ // forks, sources, member. Default is "all".
Type string `url:"type,omitempty"`
ListOptions
@@ -196,7 +196,7 @@ type RepositoryListByOrgOptions struct {
// ListByOrg lists the repositories for an organization.
//
-// GitHub API docs: http://developer.github.com/v3/repos/#list-organization-repositories
+// GitHub API docs: https://developer.github.com/v3/repos/#list-organization-repositories
func (s *RepositoriesService) ListByOrg(org string, opt *RepositoryListByOrgOptions) ([]*Repository, *Response, error) {
u := fmt.Sprintf("orgs/%v/repos", org)
u, err := addOptions(u, opt)
@@ -232,7 +232,7 @@ type RepositoryListAllOptions struct {
// ListAll lists all GitHub repositories in the order that they were created.
//
-// GitHub API docs: http://developer.github.com/v3/repos/#list-all-public-repositories
+// GitHub API docs: https://developer.github.com/v3/repos/#list-all-public-repositories
func (s *RepositoriesService) ListAll(opt *RepositoryListAllOptions) ([]*Repository, *Response, error) {
u, err := addOptions("repositories", opt)
if err != nil {
@@ -253,11 +253,11 @@ func (s *RepositoriesService) ListAll(opt *RepositoryListAllOptions) ([]*Reposit
return repos, resp, nil
}
-// Create a new repository. If an organization is specified, the new
-// repository will be created under that org. If the empty string is
+// Create a new repository. If an organization is specified, the new
+// repository will be created under that org. If the empty string is
// specified, it will be created for the authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/repos/#create
+// GitHub API docs: https://developer.github.com/v3/repos/#create
func (s *RepositoriesService) Create(org string, repo *Repository) (*Repository, *Response, error) {
var u string
if org != "" {
@@ -282,7 +282,7 @@ func (s *RepositoriesService) Create(org string, repo *Repository) (*Repository,
// Get fetches a repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/#get
+// GitHub API docs: https://developer.github.com/v3/repos/#get
func (s *RepositoriesService) Get(owner, repo string) (*Repository, *Response, error) {
u := fmt.Sprintf("repos/%v/%v", owner, repo)
req, err := s.client.NewRequest("GET", u, nil)
@@ -329,7 +329,7 @@ func (s *RepositoriesService) GetByID(id int) (*Repository, *Response, error) {
// Edit updates a repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/#edit
+// GitHub API docs: https://developer.github.com/v3/repos/#edit
func (s *RepositoriesService) Edit(owner, repo string, repository *Repository) (*Repository, *Response, error) {
u := fmt.Sprintf("repos/%v/%v", owner, repo)
req, err := s.client.NewRequest("PATCH", u, repository)
@@ -395,7 +395,7 @@ type ListContributorsOptions struct {
// ListContributors lists contributors for a repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/#list-contributors
+// GitHub API docs: https://developer.github.com/v3/repos/#list-contributors
func (s *RepositoriesService) ListContributors(owner string, repository string, opt *ListContributorsOptions) ([]*Contributor, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/contributors", owner, repository)
u, err := addOptions(u, opt)
@@ -426,7 +426,7 @@ func (s *RepositoriesService) ListContributors(owner string, repository string,
// "Python": 7769
// }
//
-// GitHub API Docs: http://developer.github.com/v3/repos/#list-languages
+// GitHub API Docs: https://developer.github.com/v3/repos/#list-languages
func (s *RepositoriesService) ListLanguages(owner string, repo string) (map[string]int, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/languages", owner, repo)
req, err := s.client.NewRequest("GET", u, nil)
@@ -559,7 +559,7 @@ type BranchRestrictionsRequest struct {
// ListBranches lists branches for the specified repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/#list-branches
+// GitHub API docs: https://developer.github.com/v3/repos/#list-branches
func (s *RepositoriesService) ListBranches(owner string, repo string, opt *ListOptions) ([]*Branch, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/branches", owner, repo)
u, err := addOptions(u, opt)
diff --git a/vendor/github.com/google/go-github/github/repos_collaborators.go b/vendor/github.com/google/go-github/github/repos_collaborators.go
index a19a14a..ddb88f5 100644
--- a/vendor/github.com/google/go-github/github/repos_collaborators.go
+++ b/vendor/github.com/google/go-github/github/repos_collaborators.go
@@ -9,7 +9,7 @@ import "fmt"
// ListCollaborators lists the Github users that have access to the repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/collaborators/#list
+// GitHub API docs: https://developer.github.com/v3/repos/collaborators/#list
func (s *RepositoriesService) ListCollaborators(owner, repo string, opt *ListOptions) ([]*User, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/collaborators", owner, repo)
u, err := addOptions(u, opt)
@@ -36,7 +36,7 @@ func (s *RepositoriesService) ListCollaborators(owner, repo string, opt *ListOpt
// Note: This will return false if the user is not a collaborator OR the user
// is not a GitHub user.
//
-// GitHub API docs: http://developer.github.com/v3/repos/collaborators/#get
+// GitHub API docs: https://developer.github.com/v3/repos/collaborators/#get
func (s *RepositoriesService) IsCollaborator(owner, repo, user string) (bool, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/collaborators/%v", owner, repo, user)
req, err := s.client.NewRequest("GET", u, nil)
@@ -87,7 +87,7 @@ type RepositoryAddCollaboratorOptions struct {
// push - team members can pull and push, but not administer this repository
// admin - team members can pull, push and administer this repository
//
- // Default value is "push". This option is only valid for organization-owned repositories.
+ // Default value is "push". This option is only valid for organization-owned repositories.
Permission string `json:"permission,omitempty"`
}
@@ -110,7 +110,7 @@ func (s *RepositoriesService) AddCollaborator(owner, repo, user string, opt *Rep
// RemoveCollaborator removes the specified Github user as collaborator from the given repo.
// Note: Does not return error if a valid user that is not a collaborator is removed.
//
-// GitHub API docs: http://developer.github.com/v3/repos/collaborators/#remove-collaborator
+// GitHub API docs: https://developer.github.com/v3/repos/collaborators/#remove-collaborator
func (s *RepositoriesService) RemoveCollaborator(owner, repo, user string) (*Response, error) {
u := fmt.Sprintf("repos/%v/%v/collaborators/%v", owner, repo, user)
req, err := s.client.NewRequest("DELETE", u, nil)
diff --git a/vendor/github.com/google/go-github/github/repos_comments.go b/vendor/github.com/google/go-github/github/repos_comments.go
index 7abedc8..d5917e1 100644
--- a/vendor/github.com/google/go-github/github/repos_comments.go
+++ b/vendor/github.com/google/go-github/github/repos_comments.go
@@ -34,7 +34,7 @@ func (r RepositoryComment) String() string {
// ListComments lists all the comments for the repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/comments/#list-commit-comments-for-a-repository
+// GitHub API docs: https://developer.github.com/v3/repos/comments/#list-commit-comments-for-a-repository
func (s *RepositoriesService) ListComments(owner, repo string, opt *ListOptions) ([]*RepositoryComment, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/comments", owner, repo)
u, err := addOptions(u, opt)
@@ -61,7 +61,7 @@ func (s *RepositoriesService) ListComments(owner, repo string, opt *ListOptions)
// ListCommitComments lists all the comments for a given commit SHA.
//
-// GitHub API docs: http://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit
+// GitHub API docs: https://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit
func (s *RepositoriesService) ListCommitComments(owner, repo, sha string, opt *ListOptions) ([]*RepositoryComment, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/commits/%v/comments", owner, repo, sha)
u, err := addOptions(u, opt)
@@ -89,7 +89,7 @@ func (s *RepositoriesService) ListCommitComments(owner, repo, sha string, opt *L
// CreateComment creates a comment for the given commit.
// Note: GitHub allows for comments to be created for non-existing files and positions.
//
-// GitHub API docs: http://developer.github.com/v3/repos/comments/#create-a-commit-comment
+// GitHub API docs: https://developer.github.com/v3/repos/comments/#create-a-commit-comment
func (s *RepositoriesService) CreateComment(owner, repo, sha string, comment *RepositoryComment) (*RepositoryComment, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/commits/%v/comments", owner, repo, sha)
req, err := s.client.NewRequest("POST", u, comment)
@@ -103,12 +103,12 @@ func (s *RepositoriesService) CreateComment(owner, repo, sha string, comment *Re
return nil, resp, err
}
- return c, resp, err
+ return c, resp, nil
}
// GetComment gets a single comment from a repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/comments/#get-a-single-commit-comment
+// GitHub API docs: https://developer.github.com/v3/repos/comments/#get-a-single-commit-comment
func (s *RepositoriesService) GetComment(owner, repo string, id int) (*RepositoryComment, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/comments/%v", owner, repo, id)
req, err := s.client.NewRequest("GET", u, nil)
@@ -125,12 +125,12 @@ func (s *RepositoriesService) GetComment(owner, repo string, id int) (*Repositor
return nil, resp, err
}
- return c, resp, err
+ return c, resp, nil
}
// UpdateComment updates the body of a single comment.
//
-// GitHub API docs: http://developer.github.com/v3/repos/comments/#update-a-commit-comment
+// GitHub API docs: https://developer.github.com/v3/repos/comments/#update-a-commit-comment
func (s *RepositoriesService) UpdateComment(owner, repo string, id int, comment *RepositoryComment) (*RepositoryComment, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/comments/%v", owner, repo, id)
req, err := s.client.NewRequest("PATCH", u, comment)
@@ -144,12 +144,12 @@ func (s *RepositoriesService) UpdateComment(owner, repo string, id int, comment
return nil, resp, err
}
- return c, resp, err
+ return c, resp, nil
}
// DeleteComment deletes a single comment from a repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/comments/#delete-a-commit-comment
+// GitHub API docs: https://developer.github.com/v3/repos/comments/#delete-a-commit-comment
func (s *RepositoriesService) DeleteComment(owner, repo string, id int) (*Response, error) {
u := fmt.Sprintf("repos/%v/%v/comments/%v", owner, repo, id)
req, err := s.client.NewRequest("DELETE", u, nil)
diff --git a/vendor/github.com/google/go-github/github/repos_commits.go b/vendor/github.com/google/go-github/github/repos_commits.go
index bc0fbf9..110e7b2 100644
--- a/vendor/github.com/google/go-github/github/repos_commits.go
+++ b/vendor/github.com/google/go-github/github/repos_commits.go
@@ -107,7 +107,7 @@ type CommitsListOptions struct {
// ListCommits lists the commits of a repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/commits/#list
+// GitHub API docs: https://developer.github.com/v3/repos/commits/#list
func (s *RepositoriesService) ListCommits(owner, repo string, opt *CommitsListOptions) ([]*RepositoryCommit, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/commits", owner, repo)
u, err := addOptions(u, opt)
@@ -132,8 +132,8 @@ func (s *RepositoriesService) ListCommits(owner, repo string, opt *CommitsListOp
// GetCommit fetches the specified commit, including all details about it.
// todo: support media formats - https://github.com/google/go-github/issues/6
//
-// GitHub API docs: http://developer.github.com/v3/repos/commits/#get-a-single-commit
-// See also: http://developer.github.com//v3/git/commits/#get-a-single-commit provides the same functionality
+// GitHub API docs: https://developer.github.com/v3/repos/commits/#get-a-single-commit
+// See also: https://developer.github.com//v3/git/commits/#get-a-single-commit provides the same functionality
func (s *RepositoriesService) GetCommit(owner, repo, sha string) (*RepositoryCommit, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/commits/%v", owner, repo, sha)
@@ -151,10 +151,10 @@ func (s *RepositoriesService) GetCommit(owner, repo, sha string) (*RepositoryCom
return nil, resp, err
}
- return commit, resp, err
+ return commit, resp, nil
}
-// GetCommitSHA1 gets the SHA-1 of a commit reference. If a last-known SHA1 is
+// GetCommitSHA1 gets the SHA-1 of a commit reference. If a last-known SHA1 is
// supplied and no new commits have occurred, a 304 Unmodified response is returned.
//
// GitHub API docs: https://developer.github.com/v3/repos/commits/#get-the-sha-1-of-a-commit-reference
@@ -177,13 +177,13 @@ func (s *RepositoriesService) GetCommitSHA1(owner, repo, ref, lastSHA string) (s
return "", resp, err
}
- return buf.String(), resp, err
+ return buf.String(), resp, nil
}
// CompareCommits compares a range of commits with each other.
// todo: support media formats - https://github.com/google/go-github/issues/6
//
-// GitHub API docs: http://developer.github.com/v3/repos/commits/index.html#compare-two-commits
+// GitHub API docs: https://developer.github.com/v3/repos/commits/index.html#compare-two-commits
func (s *RepositoriesService) CompareCommits(owner, repo string, base, head string) (*CommitsComparison, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/compare/%v...%v", owner, repo, base, head)
@@ -198,5 +198,5 @@ func (s *RepositoriesService) CompareCommits(owner, repo string, base, head stri
return nil, resp, err
}
- return comp, resp, err
+ return comp, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/repos_contents.go b/vendor/github.com/google/go-github/github/repos_contents.go
index 7b08cf0..32b1573 100644
--- a/vendor/github.com/google/go-github/github/repos_contents.go
+++ b/vendor/github.com/google/go-github/github/repos_contents.go
@@ -4,14 +4,13 @@
// license that can be found in the LICENSE file.
// Repository contents API methods.
-// http://developer.github.com/v3/repos/contents/
+// https://developer.github.com/v3/repos/contents/
package github
import (
"encoding/base64"
"encoding/json"
- "errors"
"fmt"
"io"
"net/http"
@@ -64,20 +63,6 @@ func (r RepositoryContent) String() string {
return Stringify(r)
}
-// Decode decodes the file content if it is base64 encoded.
-//
-// Deprecated: Use GetContent instead.
-func (r *RepositoryContent) Decode() ([]byte, error) {
- if *r.Encoding != "base64" {
- return nil, errors.New("cannot decode non-base64")
- }
- o, err := base64.StdEncoding.DecodeString(*r.Content)
- if err != nil {
- return nil, err
- }
- return o, nil
-}
-
// GetContent returns the content of r, decoding it if necessary.
func (r *RepositoryContent) GetContent() (string, error) {
var encoding string
@@ -101,7 +86,7 @@ func (r *RepositoryContent) GetContent() (string, error) {
// GetReadme gets the Readme file for the repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/contents/#get-the-readme
+// GitHub API docs: https://developer.github.com/v3/repos/contents/#get-the-readme
func (s *RepositoriesService) GetReadme(owner, repo string, opt *RepositoryContentGetOptions) (*RepositoryContent, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/readme", owner, repo)
u, err := addOptions(u, opt)
@@ -117,7 +102,7 @@ func (s *RepositoriesService) GetReadme(owner, repo string, opt *RepositoryConte
if err != nil {
return nil, resp, err
}
- return readme, resp, err
+ return readme, resp, nil
}
// DownloadContents returns an io.ReadCloser that reads the contents of the
@@ -153,7 +138,7 @@ func (s *RepositoriesService) DownloadContents(owner, repo, filepath string, opt
// as possible, both result types will be returned but only one will contain a
// value and the other will be nil.
//
-// GitHub API docs: http://developer.github.com/v3/repos/contents/#get-contents
+// GitHub API docs: https://developer.github.com/v3/repos/contents/#get-contents
func (s *RepositoriesService) GetContents(owner, repo, path string, opt *RepositoryContentGetOptions) (fileContent *RepositoryContent, directoryContent []*RepositoryContent, resp *Response, err error) {
escapedPath := (&url.URL{Path: path}).String()
u := fmt.Sprintf("repos/%s/%s/contents/%s", owner, repo, escapedPath)
@@ -184,7 +169,7 @@ func (s *RepositoriesService) GetContents(owner, repo, path string, opt *Reposit
// CreateFile creates a new file in a repository at the given path and returns
// the commit and file metadata.
//
-// GitHub API docs: http://developer.github.com/v3/repos/contents/#create-a-file
+// GitHub API docs: https://developer.github.com/v3/repos/contents/#create-a-file
func (s *RepositoriesService) CreateFile(owner, repo, path string, opt *RepositoryContentFileOptions) (*RepositoryContentResponse, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/contents/%s", owner, repo, path)
req, err := s.client.NewRequest("PUT", u, opt)
@@ -196,13 +181,13 @@ func (s *RepositoriesService) CreateFile(owner, repo, path string, opt *Reposito
if err != nil {
return nil, resp, err
}
- return createResponse, resp, err
+ return createResponse, resp, nil
}
// UpdateFile updates a file in a repository at the given path and returns the
// commit and file metadata. Requires the blob SHA of the file being updated.
//
-// GitHub API docs: http://developer.github.com/v3/repos/contents/#update-a-file
+// GitHub API docs: https://developer.github.com/v3/repos/contents/#update-a-file
func (s *RepositoriesService) UpdateFile(owner, repo, path string, opt *RepositoryContentFileOptions) (*RepositoryContentResponse, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/contents/%s", owner, repo, path)
req, err := s.client.NewRequest("PUT", u, opt)
@@ -214,13 +199,13 @@ func (s *RepositoriesService) UpdateFile(owner, repo, path string, opt *Reposito
if err != nil {
return nil, resp, err
}
- return updateResponse, resp, err
+ return updateResponse, resp, nil
}
// DeleteFile deletes a file from a repository and returns the commit.
// Requires the blob SHA of the file to be deleted.
//
-// GitHub API docs: http://developer.github.com/v3/repos/contents/#delete-a-file
+// GitHub API docs: https://developer.github.com/v3/repos/contents/#delete-a-file
func (s *RepositoriesService) DeleteFile(owner, repo, path string, opt *RepositoryContentFileOptions) (*RepositoryContentResponse, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/contents/%s", owner, repo, path)
req, err := s.client.NewRequest("DELETE", u, opt)
@@ -232,7 +217,7 @@ func (s *RepositoriesService) DeleteFile(owner, repo, path string, opt *Reposito
if err != nil {
return nil, resp, err
}
- return deleteResponse, resp, err
+ return deleteResponse, resp, nil
}
// archiveFormat is used to define the archive type when calling GetArchiveLink.
@@ -250,7 +235,7 @@ const (
// repository. The archiveFormat can be specified by either the github.Tarball
// or github.Zipball constant.
//
-// GitHub API docs: http://developer.github.com/v3/repos/contents/#get-archive-link
+// GitHub API docs: https://developer.github.com/v3/repos/contents/#get-archive-link
func (s *RepositoriesService) GetArchiveLink(owner, repo string, archiveformat archiveFormat, opt *RepositoryContentGetOptions) (*url.URL, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/%s", owner, repo, archiveformat)
if opt != nil && opt.Ref != "" {
diff --git a/vendor/github.com/google/go-github/github/repos_deployments.go b/vendor/github.com/google/go-github/github/repos_deployments.go
index 32a9a25..ad931af 100644
--- a/vendor/github.com/google/go-github/github/repos_deployments.go
+++ b/vendor/github.com/google/go-github/github/repos_deployments.go
@@ -99,7 +99,7 @@ func (s *RepositoriesService) GetDeployment(owner, repo string, deploymentID int
return nil, resp, err
}
- return deployment, resp, err
+ return deployment, resp, nil
}
// CreateDeployment creates a new deployment for a repository.
@@ -122,7 +122,7 @@ func (s *RepositoriesService) CreateDeployment(owner, repo string, request *Depl
return nil, resp, err
}
- return d, resp, err
+ return d, resp, nil
}
// DeploymentStatus represents the status of a
@@ -144,7 +144,6 @@ type DeploymentStatus struct {
// DeploymentStatusRequest represents a deployment request
type DeploymentStatusRequest struct {
State *string `json:"state,omitempty"`
- TargetURL *string `json:"target_url,omitempty"` // Deprecated. Use LogURL instead.
LogURL *string `json:"log_url,omitempty"`
Description *string `json:"description,omitempty"`
EnvironmentURL *string `json:"environment_url,omitempty"`
@@ -195,7 +194,7 @@ func (s *RepositoriesService) GetDeploymentStatus(owner, repo string, deployment
return nil, resp, err
}
- return d, resp, err
+ return d, resp, nil
}
// CreateDeploymentStatus creates a new status for a deployment.
@@ -218,5 +217,5 @@ func (s *RepositoriesService) CreateDeploymentStatus(owner, repo string, deploym
return nil, resp, err
}
- return d, resp, err
+ return d, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/repos_forks.go b/vendor/github.com/google/go-github/github/repos_forks.go
index 986559d..fe98a6c 100644
--- a/vendor/github.com/google/go-github/github/repos_forks.go
+++ b/vendor/github.com/google/go-github/github/repos_forks.go
@@ -10,8 +10,8 @@ import "fmt"
// RepositoryListForksOptions specifies the optional parameters to the
// RepositoriesService.ListForks method.
type RepositoryListForksOptions struct {
- // How to sort the forks list. Possible values are: newest, oldest,
- // watchers. Default is "newest".
+ // How to sort the forks list. Possible values are: newest, oldest,
+ // watchers. Default is "newest".
Sort string `url:"sort,omitempty"`
ListOptions
@@ -19,7 +19,7 @@ type RepositoryListForksOptions struct {
// ListForks lists the forks of the specified repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/forks/#list-forks
+// GitHub API docs: https://developer.github.com/v3/repos/forks/#list-forks
func (s *RepositoriesService) ListForks(owner, repo string, opt *RepositoryListForksOptions) ([]*Repository, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/forks", owner, repo)
u, err := addOptions(u, opt)
@@ -75,5 +75,5 @@ func (s *RepositoriesService) CreateFork(owner, repo string, opt *RepositoryCrea
return nil, resp, err
}
- return fork, resp, err
+ return fork, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/repos_hooks.go b/vendor/github.com/google/go-github/github/repos_hooks.go
index 25f50b2..818286b 100644
--- a/vendor/github.com/google/go-github/github/repos_hooks.go
+++ b/vendor/github.com/google/go-github/github/repos_hooks.go
@@ -11,9 +11,9 @@ import (
)
// WebHookPayload represents the data that is received from GitHub when a push
-// event hook is triggered. The format of these payloads pre-date most of the
+// event hook is triggered. The format of these payloads pre-date most of the
// GitHub v3 API, so there are lots of minor incompatibilities with the types
-// defined in the rest of the API. Therefore, several types are duplicated
+// defined in the rest of the API. Therefore, several types are duplicated
// here to account for these differences.
//
// GitHub API docs: https://help.github.com/articles/post-receive-hooks
@@ -55,7 +55,7 @@ func (w WebHookCommit) String() string {
}
// WebHookAuthor represents the author or committer of a commit, as specified
-// in a WebHookCommit. The commit author may not correspond to a GitHub User.
+// in a WebHookCommit. The commit author may not correspond to a GitHub User.
type WebHookAuthor struct {
Email *string `json:"email,omitempty"`
Name *string `json:"name,omitempty"`
@@ -85,7 +85,7 @@ func (h Hook) String() string {
// CreateHook creates a Hook for the specified repository.
// Name and Config are required fields.
//
-// GitHub API docs: http://developer.github.com/v3/repos/hooks/#create-a-hook
+// GitHub API docs: https://developer.github.com/v3/repos/hooks/#create-a-hook
func (s *RepositoriesService) CreateHook(owner, repo string, hook *Hook) (*Hook, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/hooks", owner, repo)
req, err := s.client.NewRequest("POST", u, hook)
@@ -99,12 +99,12 @@ func (s *RepositoriesService) CreateHook(owner, repo string, hook *Hook) (*Hook,
return nil, resp, err
}
- return h, resp, err
+ return h, resp, nil
}
// ListHooks lists all Hooks for the specified repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/hooks/#list
+// GitHub API docs: https://developer.github.com/v3/repos/hooks/#list
func (s *RepositoriesService) ListHooks(owner, repo string, opt *ListOptions) ([]*Hook, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/hooks", owner, repo)
u, err := addOptions(u, opt)
@@ -128,7 +128,7 @@ func (s *RepositoriesService) ListHooks(owner, repo string, opt *ListOptions) ([
// GetHook returns a single specified Hook.
//
-// GitHub API docs: http://developer.github.com/v3/repos/hooks/#get-single-hook
+// GitHub API docs: https://developer.github.com/v3/repos/hooks/#get-single-hook
func (s *RepositoriesService) GetHook(owner, repo string, id int) (*Hook, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/hooks/%d", owner, repo, id)
req, err := s.client.NewRequest("GET", u, nil)
@@ -142,7 +142,7 @@ func (s *RepositoriesService) GetHook(owner, repo string, id int) (*Hook, *Respo
// EditHook updates a specified Hook.
//
-// GitHub API docs: http://developer.github.com/v3/repos/hooks/#edit-a-hook
+// GitHub API docs: https://developer.github.com/v3/repos/hooks/#edit-a-hook
func (s *RepositoriesService) EditHook(owner, repo string, id int, hook *Hook) (*Hook, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/hooks/%d", owner, repo, id)
req, err := s.client.NewRequest("PATCH", u, hook)
@@ -156,7 +156,7 @@ func (s *RepositoriesService) EditHook(owner, repo string, id int, hook *Hook) (
// DeleteHook deletes a specified Hook.
//
-// GitHub API docs: http://developer.github.com/v3/repos/hooks/#delete-a-hook
+// GitHub API docs: https://developer.github.com/v3/repos/hooks/#delete-a-hook
func (s *RepositoriesService) DeleteHook(owner, repo string, id int) (*Response, error) {
u := fmt.Sprintf("repos/%v/%v/hooks/%d", owner, repo, id)
req, err := s.client.NewRequest("DELETE", u, nil)
@@ -180,7 +180,7 @@ func (s *RepositoriesService) PingHook(owner, repo string, id int) (*Response, e
// TestHook triggers a test Hook by github.
//
-// GitHub API docs: http://developer.github.com/v3/repos/hooks/#test-a-push-hook
+// GitHub API docs: https://developer.github.com/v3/repos/hooks/#test-a-push-hook
func (s *RepositoriesService) TestHook(owner, repo string, id int) (*Response, error) {
u := fmt.Sprintf("repos/%v/%v/hooks/%d/tests", owner, repo, id)
req, err := s.client.NewRequest("POST", u, nil)
@@ -189,8 +189,3 @@ func (s *RepositoriesService) TestHook(owner, repo string, id int) (*Response, e
}
return s.client.Do(req, nil)
}
-
-// ListServiceHooks is deprecated. Use Client.ListServiceHooks instead.
-func (s *RepositoriesService) ListServiceHooks() ([]*ServiceHook, *Response, error) {
- return s.client.ListServiceHooks()
-}
diff --git a/vendor/github.com/google/go-github/github/repos_invitations.go b/vendor/github.com/google/go-github/github/repos_invitations.go
index f2806d1..e80b946 100644
--- a/vendor/github.com/google/go-github/github/repos_invitations.go
+++ b/vendor/github.com/google/go-github/github/repos_invitations.go
@@ -46,7 +46,7 @@ func (s *RepositoriesService) ListInvitations(repoID int, opt *ListOptions) ([]*
return nil, resp, err
}
- return invites, resp, err
+ return invites, resp, nil
}
// DeleteInvitation deletes a repository invitation.
diff --git a/vendor/github.com/google/go-github/github/repos_keys.go b/vendor/github.com/google/go-github/github/repos_keys.go
index f8f4f48..1ac35da 100644
--- a/vendor/github.com/google/go-github/github/repos_keys.go
+++ b/vendor/github.com/google/go-github/github/repos_keys.go
@@ -11,7 +11,7 @@ import "fmt"
// ListKeys lists the deploy keys for a repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/keys/#list
+// GitHub API docs: https://developer.github.com/v3/repos/keys/#list
func (s *RepositoriesService) ListKeys(owner string, repo string, opt *ListOptions) ([]*Key, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/keys", owner, repo)
u, err := addOptions(u, opt)
@@ -35,7 +35,7 @@ func (s *RepositoriesService) ListKeys(owner string, repo string, opt *ListOptio
// GetKey fetches a single deploy key.
//
-// GitHub API docs: http://developer.github.com/v3/repos/keys/#get
+// GitHub API docs: https://developer.github.com/v3/repos/keys/#get
func (s *RepositoriesService) GetKey(owner string, repo string, id int) (*Key, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/keys/%v", owner, repo, id)
@@ -50,12 +50,12 @@ func (s *RepositoriesService) GetKey(owner string, repo string, id int) (*Key, *
return nil, resp, err
}
- return key, resp, err
+ return key, resp, nil
}
// CreateKey adds a deploy key for a repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/keys/#create
+// GitHub API docs: https://developer.github.com/v3/repos/keys/#create
func (s *RepositoriesService) CreateKey(owner string, repo string, key *Key) (*Key, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/keys", owner, repo)
@@ -70,12 +70,12 @@ func (s *RepositoriesService) CreateKey(owner string, repo string, key *Key) (*K
return nil, resp, err
}
- return k, resp, err
+ return k, resp, nil
}
// EditKey edits a deploy key.
//
-// GitHub API docs: http://developer.github.com/v3/repos/keys/#edit
+// GitHub API docs: https://developer.github.com/v3/repos/keys/#edit
func (s *RepositoriesService) EditKey(owner string, repo string, id int, key *Key) (*Key, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/keys/%v", owner, repo, id)
@@ -90,12 +90,12 @@ func (s *RepositoriesService) EditKey(owner string, repo string, id int, key *Ke
return nil, resp, err
}
- return k, resp, err
+ return k, resp, nil
}
// DeleteKey deletes a deploy key.
//
-// GitHub API docs: http://developer.github.com/v3/repos/keys/#delete
+// GitHub API docs: https://developer.github.com/v3/repos/keys/#delete
func (s *RepositoriesService) DeleteKey(owner string, repo string, id int) (*Response, error) {
u := fmt.Sprintf("repos/%v/%v/keys/%v", owner, repo, id)
diff --git a/vendor/github.com/google/go-github/github/repos_merging.go b/vendor/github.com/google/go-github/github/repos_merging.go
index 31f8313..f9aefb4 100644
--- a/vendor/github.com/google/go-github/github/repos_merging.go
+++ b/vendor/github.com/google/go-github/github/repos_merging.go
@@ -33,5 +33,5 @@ func (s *RepositoriesService) Merge(owner, repo string, request *RepositoryMerge
return nil, resp, err
}
- return commit, resp, err
+ return commit, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/repos_pages.go b/vendor/github.com/google/go-github/github/repos_pages.go
index ddd8301..e4bb6d8 100644
--- a/vendor/github.com/google/go-github/github/repos_pages.go
+++ b/vendor/github.com/google/go-github/github/repos_pages.go
@@ -52,7 +52,7 @@ func (s *RepositoriesService) GetPagesInfo(owner, repo string) (*Pages, *Respons
return nil, resp, err
}
- return site, resp, err
+ return site, resp, nil
}
// ListPagesBuilds lists the builds for a GitHub Pages site.
@@ -71,7 +71,7 @@ func (s *RepositoriesService) ListPagesBuilds(owner, repo string) ([]*PagesBuild
return nil, resp, err
}
- return pages, resp, err
+ return pages, resp, nil
}
// GetLatestPagesBuild fetches the latest build information for a GitHub pages site.
@@ -90,7 +90,7 @@ func (s *RepositoriesService) GetLatestPagesBuild(owner, repo string) (*PagesBui
return nil, resp, err
}
- return build, resp, err
+ return build, resp, nil
}
// GetPageBuild fetches the specific build information for a GitHub pages site.
@@ -109,7 +109,7 @@ func (s *RepositoriesService) GetPageBuild(owner, repo string, id int) (*PagesBu
return nil, resp, err
}
- return build, resp, err
+ return build, resp, nil
}
// RequestPageBuild requests a build of a GitHub Pages site without needing to push new commit.
@@ -131,5 +131,5 @@ func (s *RepositoriesService) RequestPageBuild(owner, repo string) (*PagesBuild,
return nil, resp, err
}
- return build, resp, err
+ return build, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/repos_projects.go b/vendor/github.com/google/go-github/github/repos_projects.go
index 137f89d..dc9227c 100644
--- a/vendor/github.com/google/go-github/github/repos_projects.go
+++ b/vendor/github.com/google/go-github/github/repos_projects.go
@@ -31,7 +31,7 @@ func (s *RepositoriesService) ListProjects(owner, repo string, opt *ListOptions)
return nil, resp, err
}
- return projects, resp, err
+ return projects, resp, nil
}
// CreateProject creates a GitHub Project for the specified repository.
@@ -53,5 +53,5 @@ func (s *RepositoriesService) CreateProject(owner, repo string, opt *ProjectOpti
return nil, resp, err
}
- return project, resp, err
+ return project, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/repos_releases.go b/vendor/github.com/google/go-github/github/repos_releases.go
index 72d95eb..10abc88 100644
--- a/vendor/github.com/google/go-github/github/repos_releases.go
+++ b/vendor/github.com/google/go-github/github/repos_releases.go
@@ -63,7 +63,7 @@ func (r ReleaseAsset) String() string {
// ListReleases lists the releases for a repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/releases/#list-releases-for-a-repository
+// GitHub API docs: https://developer.github.com/v3/repos/releases/#list-releases-for-a-repository
func (s *RepositoriesService) ListReleases(owner, repo string, opt *ListOptions) ([]*RepositoryRelease, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/releases", owner, repo)
u, err := addOptions(u, opt)
@@ -86,7 +86,7 @@ func (s *RepositoriesService) ListReleases(owner, repo string, opt *ListOptions)
// GetRelease fetches a single release.
//
-// GitHub API docs: http://developer.github.com/v3/repos/releases/#get-a-single-release
+// GitHub API docs: https://developer.github.com/v3/repos/releases/#get-a-single-release
func (s *RepositoriesService) GetRelease(owner, repo string, id int) (*RepositoryRelease, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/releases/%d", owner, repo, id)
return s.getSingleRelease(u)
@@ -119,12 +119,12 @@ func (s *RepositoriesService) getSingleRelease(url string) (*RepositoryRelease,
if err != nil {
return nil, resp, err
}
- return release, resp, err
+ return release, resp, nil
}
// CreateRelease adds a new release for a repository.
//
-// GitHub API docs : http://developer.github.com/v3/repos/releases/#create-a-release
+// GitHub API docs : https://developer.github.com/v3/repos/releases/#create-a-release
func (s *RepositoriesService) CreateRelease(owner, repo string, release *RepositoryRelease) (*RepositoryRelease, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/releases", owner, repo)
@@ -138,12 +138,12 @@ func (s *RepositoriesService) CreateRelease(owner, repo string, release *Reposit
if err != nil {
return nil, resp, err
}
- return r, resp, err
+ return r, resp, nil
}
// EditRelease edits a repository release.
//
-// GitHub API docs : http://developer.github.com/v3/repos/releases/#edit-a-release
+// GitHub API docs : https://developer.github.com/v3/repos/releases/#edit-a-release
func (s *RepositoriesService) EditRelease(owner, repo string, id int, release *RepositoryRelease) (*RepositoryRelease, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/releases/%d", owner, repo, id)
@@ -157,12 +157,12 @@ func (s *RepositoriesService) EditRelease(owner, repo string, id int, release *R
if err != nil {
return nil, resp, err
}
- return r, resp, err
+ return r, resp, nil
}
// DeleteRelease delete a single release from a repository.
//
-// GitHub API docs : http://developer.github.com/v3/repos/releases/#delete-a-release
+// GitHub API docs : https://developer.github.com/v3/repos/releases/#delete-a-release
func (s *RepositoriesService) DeleteRelease(owner, repo string, id int) (*Response, error) {
u := fmt.Sprintf("repos/%s/%s/releases/%d", owner, repo, id)
@@ -175,7 +175,7 @@ func (s *RepositoriesService) DeleteRelease(owner, repo string, id int) (*Respon
// ListReleaseAssets lists the release's assets.
//
-// GitHub API docs : http://developer.github.com/v3/repos/releases/#list-assets-for-a-release
+// GitHub API docs : https://developer.github.com/v3/repos/releases/#list-assets-for-a-release
func (s *RepositoriesService) ListReleaseAssets(owner, repo string, id int, opt *ListOptions) ([]*ReleaseAsset, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/releases/%d/assets", owner, repo, id)
u, err := addOptions(u, opt)
@@ -198,7 +198,7 @@ func (s *RepositoriesService) ListReleaseAssets(owner, repo string, id int, opt
// GetReleaseAsset fetches a single release asset.
//
-// GitHub API docs : http://developer.github.com/v3/repos/releases/#get-a-single-release-asset
+// GitHub API docs : https://developer.github.com/v3/repos/releases/#get-a-single-release-asset
func (s *RepositoriesService) GetReleaseAsset(owner, repo string, id int) (*ReleaseAsset, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/releases/assets/%d", owner, repo, id)
@@ -212,7 +212,7 @@ func (s *RepositoriesService) GetReleaseAsset(owner, repo string, id int) (*Rele
if err != nil {
return nil, resp, err
}
- return asset, resp, err
+ return asset, resp, nil
}
// DownloadReleaseAsset downloads a release asset or returns a redirect URL.
@@ -222,7 +222,7 @@ func (s *RepositoriesService) GetReleaseAsset(owner, repo string, id int) (*Rele
// If a redirect is returned, the redirect URL will be returned as a string instead
// of the io.ReadCloser. Exactly one of rc and redirectURL will be zero.
//
-// GitHub API docs : http://developer.github.com/v3/repos/releases/#get-a-single-release-asset
+// GitHub API docs : https://developer.github.com/v3/repos/releases/#get-a-single-release-asset
func (s *RepositoriesService) DownloadReleaseAsset(owner, repo string, id int) (rc io.ReadCloser, redirectURL string, err error) {
u := fmt.Sprintf("repos/%s/%s/releases/assets/%d", owner, repo, id)
@@ -261,7 +261,7 @@ func (s *RepositoriesService) DownloadReleaseAsset(owner, repo string, id int) (
// EditReleaseAsset edits a repository release asset.
//
-// GitHub API docs : http://developer.github.com/v3/repos/releases/#edit-a-release-asset
+// GitHub API docs : https://developer.github.com/v3/repos/releases/#edit-a-release-asset
func (s *RepositoriesService) EditReleaseAsset(owner, repo string, id int, release *ReleaseAsset) (*ReleaseAsset, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/releases/assets/%d", owner, repo, id)
@@ -275,12 +275,12 @@ func (s *RepositoriesService) EditReleaseAsset(owner, repo string, id int, relea
if err != nil {
return nil, resp, err
}
- return asset, resp, err
+ return asset, resp, nil
}
// DeleteReleaseAsset delete a single release asset from a repository.
//
-// GitHub API docs : http://developer.github.com/v3/repos/releases/#delete-a-release-asset
+// GitHub API docs : https://developer.github.com/v3/repos/releases/#delete-a-release-asset
func (s *RepositoriesService) DeleteReleaseAsset(owner, repo string, id int) (*Response, error) {
u := fmt.Sprintf("repos/%s/%s/releases/assets/%d", owner, repo, id)
@@ -294,7 +294,7 @@ func (s *RepositoriesService) DeleteReleaseAsset(owner, repo string, id int) (*R
// UploadReleaseAsset creates an asset by uploading a file into a release repository.
// To upload assets that cannot be represented by an os.File, call NewUploadRequest directly.
//
-// GitHub API docs : http://developer.github.com/v3/repos/releases/#upload-a-release-asset
+// GitHub API docs : https://developer.github.com/v3/repos/releases/#upload-a-release-asset
func (s *RepositoriesService) UploadReleaseAsset(owner, repo string, id int, opt *UploadOptions, file *os.File) (*ReleaseAsset, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/releases/%d/assets", owner, repo, id)
u, err := addOptions(u, opt)
@@ -321,5 +321,5 @@ func (s *RepositoriesService) UploadReleaseAsset(owner, repo string, id int, opt
if err != nil {
return nil, resp, err
}
- return asset, resp, err
+ return asset, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/repos_stats.go b/vendor/github.com/google/go-github/github/repos_stats.go
index 8657bd7..5ed1dec 100644
--- a/vendor/github.com/google/go-github/github/repos_stats.go
+++ b/vendor/github.com/google/go-github/github/repos_stats.go
@@ -58,7 +58,7 @@ func (s *RepositoriesService) ListContributorsStats(owner, repo string) ([]*Cont
return nil, resp, err
}
- return contributorStats, resp, err
+ return contributorStats, resp, nil
}
// WeeklyCommitActivity represents the weekly commit activity for a repository.
@@ -97,11 +97,11 @@ func (s *RepositoriesService) ListCommitActivity(owner, repo string) ([]*WeeklyC
return nil, resp, err
}
- return weeklyCommitActivity, resp, err
+ return weeklyCommitActivity, resp, nil
}
// ListCodeFrequency returns a weekly aggregate of the number of additions and
-// deletions pushed to a repository. Returned WeeklyStats will contain
+// deletions pushed to a repository. Returned WeeklyStats will contain
// additions and deletions, but not total commits.
//
// If this is the first time these statistics are requested for the given
@@ -177,7 +177,7 @@ func (s *RepositoriesService) ListParticipation(owner, repo string) (*Repository
return nil, resp, err
}
- return participation, resp, err
+ return participation, resp, nil
}
// PunchCard represents the number of commits made during a given hour of a
diff --git a/vendor/github.com/google/go-github/github/repos_statuses.go b/vendor/github.com/google/go-github/github/repos_statuses.go
index 1056eee..65c2e0a 100644
--- a/vendor/github.com/google/go-github/github/repos_statuses.go
+++ b/vendor/github.com/google/go-github/github/repos_statuses.go
@@ -15,11 +15,11 @@ type RepoStatus struct {
ID *int `json:"id,omitempty"`
URL *string `json:"url,omitempty"`
- // State is the current state of the repository. Possible values are:
+ // State is the current state of the repository. Possible values are:
// pending, success, error, or failure.
State *string `json:"state,omitempty"`
- // TargetURL is the URL of the page representing this status. It will be
+ // TargetURL is the URL of the page representing this status. It will be
// linked from the GitHub UI to allow users to see the source of the status.
TargetURL *string `json:"target_url,omitempty"`
@@ -39,9 +39,9 @@ func (r RepoStatus) String() string {
}
// ListStatuses lists the statuses of a repository at the specified
-// reference. ref can be a SHA, a branch name, or a tag name.
+// reference. ref can be a SHA, a branch name, or a tag name.
//
-// GitHub API docs: http://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref
+// GitHub API docs: https://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref
func (s *RepositoriesService) ListStatuses(owner, repo, ref string, opt *ListOptions) ([]*RepoStatus, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/commits/%v/statuses", owner, repo, ref)
u, err := addOptions(u, opt)
@@ -64,9 +64,9 @@ func (s *RepositoriesService) ListStatuses(owner, repo, ref string, opt *ListOpt
}
// CreateStatus creates a new status for a repository at the specified
-// reference. Ref can be a SHA, a branch name, or a tag name.
+// reference. Ref can be a SHA, a branch name, or a tag name.
//
-// GitHub API docs: http://developer.github.com/v3/repos/statuses/#create-a-status
+// GitHub API docs: https://developer.github.com/v3/repos/statuses/#create-a-status
func (s *RepositoriesService) CreateStatus(owner, repo, ref string, status *RepoStatus) (*RepoStatus, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/statuses/%v", owner, repo, ref)
req, err := s.client.NewRequest("POST", u, status)
@@ -80,12 +80,12 @@ func (s *RepositoriesService) CreateStatus(owner, repo, ref string, status *Repo
return nil, resp, err
}
- return repoStatus, resp, err
+ return repoStatus, resp, nil
}
// CombinedStatus represents the combined status of a repository at a particular reference.
type CombinedStatus struct {
- // State is the combined state of the repository. Possible values are:
+ // State is the combined state of the repository. Possible values are:
// failure, pending, or success.
State *string `json:"state,omitempty"`
@@ -103,7 +103,7 @@ func (s CombinedStatus) String() string {
}
// GetCombinedStatus returns the combined status of a repository at the specified
-// reference. ref can be a SHA, a branch name, or a tag name.
+// reference. ref can be a SHA, a branch name, or a tag name.
//
// GitHub API docs: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref
func (s *RepositoriesService) GetCombinedStatus(owner, repo, ref string, opt *ListOptions) (*CombinedStatus, *Response, error) {
@@ -124,5 +124,5 @@ func (s *RepositoriesService) GetCombinedStatus(owner, repo, ref string, opt *Li
return nil, resp, err
}
- return status, resp, err
+ return status, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/repos_traffic.go b/vendor/github.com/google/go-github/github/repos_traffic.go
index 0713c73..67341b9 100644
--- a/vendor/github.com/google/go-github/github/repos_traffic.go
+++ b/vendor/github.com/google/go-github/github/repos_traffic.go
@@ -110,7 +110,7 @@ func (s *RepositoriesService) ListTrafficViews(owner, repo string, opt *TrafficB
return nil, resp, err
}
- return trafficViews, resp, err
+ return trafficViews, resp, nil
}
// ListTrafficClones get total number of clones for the last 14 days and breaks it down either per day or week for the last 14 days.
@@ -134,5 +134,5 @@ func (s *RepositoriesService) ListTrafficClones(owner, repo string, opt *Traffic
return nil, resp, err
}
- return trafficClones, resp, err
+ return trafficClones, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/search.go b/vendor/github.com/google/go-github/github/search.go
index 8fd9430..e48f3ea 100644
--- a/vendor/github.com/google/go-github/github/search.go
+++ b/vendor/github.com/google/go-github/github/search.go
@@ -14,12 +14,12 @@ import (
// SearchService provides access to the search related functions
// in the GitHub API.
//
-// GitHub API docs: http://developer.github.com/v3/search/
+// GitHub API docs: https://developer.github.com/v3/search/
type SearchService service
// SearchOptions specifies optional parameters to the SearchService methods.
type SearchOptions struct {
- // How to sort the search results. Possible values are:
+ // How to sort the search results. Possible values are:
// - for repositories: stars, fork, updated
// - for commits: author-date, committer-date
// - for code: indexed
@@ -48,7 +48,7 @@ type RepositoriesSearchResult struct {
// Repositories searches repositories via various criteria.
//
-// GitHub API docs: http://developer.github.com/v3/search/#search-repositories
+// GitHub API docs: https://developer.github.com/v3/search/#search-repositories
func (s *SearchService) Repositories(query string, opt *SearchOptions) (*RepositoriesSearchResult, *Response, error) {
result := new(RepositoriesSearchResult)
resp, err := s.search("repositories", query, opt, result)
@@ -95,7 +95,7 @@ type IssuesSearchResult struct {
// Issues searches issues via various criteria.
//
-// GitHub API docs: http://developer.github.com/v3/search/#search-issues
+// GitHub API docs: https://developer.github.com/v3/search/#search-issues
func (s *SearchService) Issues(query string, opt *SearchOptions) (*IssuesSearchResult, *Response, error) {
result := new(IssuesSearchResult)
resp, err := s.search("issues", query, opt, result)
@@ -111,7 +111,7 @@ type UsersSearchResult struct {
// Users searches users via various criteria.
//
-// GitHub API docs: http://developer.github.com/v3/search/#search-users
+// GitHub API docs: https://developer.github.com/v3/search/#search-users
func (s *SearchService) Users(query string, opt *SearchOptions) (*UsersSearchResult, *Response, error) {
result := new(UsersSearchResult)
resp, err := s.search("users", query, opt, result)
@@ -160,7 +160,7 @@ func (c CodeResult) String() string {
// Code searches code via various criteria.
//
-// GitHub API docs: http://developer.github.com/v3/search/#search-code
+// GitHub API docs: https://developer.github.com/v3/search/#search-code
func (s *SearchService) Code(query string, opt *SearchOptions) (*CodeSearchResult, *Response, error) {
result := new(CodeSearchResult)
resp, err := s.search("code", query, opt, result)
diff --git a/vendor/github.com/google/go-github/github/strings.go b/vendor/github.com/google/go-github/github/strings.go
index 3857723..431e1cc 100644
--- a/vendor/github.com/google/go-github/github/strings.go
+++ b/vendor/github.com/google/go-github/github/strings.go
@@ -16,7 +16,7 @@ import (
var timestampType = reflect.TypeOf(Timestamp{})
// Stringify attempts to create a reasonable string representation of types in
-// the GitHub library. It does things like resolve pointers to their values
+// the GitHub library. It does things like resolve pointers to their values
// and omits struct fields with nil values.
func Stringify(message interface{}) string {
var buf bytes.Buffer
diff --git a/vendor/github.com/google/go-github/github/users.go b/vendor/github.com/google/go-github/github/users.go
index cd305a9..7639cb2 100644
--- a/vendor/github.com/google/go-github/github/users.go
+++ b/vendor/github.com/google/go-github/github/users.go
@@ -10,7 +10,7 @@ import "fmt"
// UsersService handles communication with the user related
// methods of the GitHub API.
//
-// GitHub API docs: http://developer.github.com/v3/users/
+// GitHub API docs: https://developer.github.com/v3/users/
type UsersService service
// User represents a GitHub user.
@@ -68,10 +68,10 @@ func (u User) String() string {
return Stringify(u)
}
-// Get fetches a user. Passing the empty string will fetch the authenticated
+// Get fetches a user. Passing the empty string will fetch the authenticated
// user.
//
-// GitHub API docs: http://developer.github.com/v3/users/#get-a-single-user
+// GitHub API docs: https://developer.github.com/v3/users/#get-a-single-user
func (s *UsersService) Get(user string) (*User, *Response, error) {
var u string
if user != "" {
@@ -90,7 +90,7 @@ func (s *UsersService) Get(user string) (*User, *Response, error) {
return nil, resp, err
}
- return uResp, resp, err
+ return uResp, resp, nil
}
// GetByID fetches a user.
@@ -109,12 +109,12 @@ func (s *UsersService) GetByID(id int) (*User, *Response, error) {
return nil, resp, err
}
- return user, resp, err
+ return user, resp, nil
}
// Edit the authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/users/#update-the-authenticated-user
+// GitHub API docs: https://developer.github.com/v3/users/#update-the-authenticated-user
func (s *UsersService) Edit(user *User) (*User, *Response, error) {
u := "user"
req, err := s.client.NewRequest("PATCH", u, user)
@@ -128,7 +128,7 @@ func (s *UsersService) Edit(user *User) (*User, *Response, error) {
return nil, resp, err
}
- return uResp, resp, err
+ return uResp, resp, nil
}
// UserListOptions specifies optional parameters to the UsersService.ListAll
@@ -144,7 +144,7 @@ type UserListOptions struct {
//
// To paginate through all users, populate 'Since' with the ID of the last user.
//
-// GitHub API docs: http://developer.github.com/v3/users/#get-all-users
+// GitHub API docs: https://developer.github.com/v3/users/#get-all-users
func (s *UsersService) ListAll(opt *UserListOptions) ([]*User, *Response, error) {
u, err := addOptions("users", opt)
if err != nil {
@@ -184,7 +184,7 @@ func (s *UsersService) ListInvitations() ([]*RepositoryInvitation, *Response, er
return nil, resp, err
}
- return invites, resp, err
+ return invites, resp, nil
}
// AcceptInvitation accepts the currently-open repository invitation for the
diff --git a/vendor/github.com/google/go-github/github/users_emails.go b/vendor/github.com/google/go-github/github/users_emails.go
index 4785946..f236b42 100644
--- a/vendor/github.com/google/go-github/github/users_emails.go
+++ b/vendor/github.com/google/go-github/github/users_emails.go
@@ -14,7 +14,7 @@ type UserEmail struct {
// ListEmails lists all email addresses for the authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/users/emails/#list-email-addresses-for-a-user
+// GitHub API docs: https://developer.github.com/v3/users/emails/#list-email-addresses-for-a-user
func (s *UsersService) ListEmails(opt *ListOptions) ([]*UserEmail, *Response, error) {
u := "user/emails"
u, err := addOptions(u, opt)
@@ -38,7 +38,7 @@ func (s *UsersService) ListEmails(opt *ListOptions) ([]*UserEmail, *Response, er
// AddEmails adds email addresses of the authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/users/emails/#add-email-addresses
+// GitHub API docs: https://developer.github.com/v3/users/emails/#add-email-addresses
func (s *UsersService) AddEmails(emails []string) ([]*UserEmail, *Response, error) {
u := "user/emails"
req, err := s.client.NewRequest("POST", u, emails)
@@ -57,7 +57,7 @@ func (s *UsersService) AddEmails(emails []string) ([]*UserEmail, *Response, erro
// DeleteEmails deletes email addresses from authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/users/emails/#delete-email-addresses
+// GitHub API docs: https://developer.github.com/v3/users/emails/#delete-email-addresses
func (s *UsersService) DeleteEmails(emails []string) (*Response, error) {
u := "user/emails"
req, err := s.client.NewRequest("DELETE", u, emails)
diff --git a/vendor/github.com/google/go-github/github/users_followers.go b/vendor/github.com/google/go-github/github/users_followers.go
index 123b1c1..9e81b60 100644
--- a/vendor/github.com/google/go-github/github/users_followers.go
+++ b/vendor/github.com/google/go-github/github/users_followers.go
@@ -7,10 +7,10 @@ package github
import "fmt"
-// ListFollowers lists the followers for a user. Passing the empty string will
+// ListFollowers lists the followers for a user. Passing the empty string will
// fetch followers for the authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/users/followers/#list-followers-of-a-user
+// GitHub API docs: https://developer.github.com/v3/users/followers/#list-followers-of-a-user
func (s *UsersService) ListFollowers(user string, opt *ListOptions) ([]*User, *Response, error) {
var u string
if user != "" {
@@ -37,10 +37,10 @@ func (s *UsersService) ListFollowers(user string, opt *ListOptions) ([]*User, *R
return users, resp, nil
}
-// ListFollowing lists the people that a user is following. Passing the empty
+// ListFollowing lists the people that a user is following. Passing the empty
// string will list people the authenticated user is following.
//
-// GitHub API docs: http://developer.github.com/v3/users/followers/#list-users-followed-by-another-user
+// GitHub API docs: https://developer.github.com/v3/users/followers/#list-users-followed-by-another-user
func (s *UsersService) ListFollowing(user string, opt *ListOptions) ([]*User, *Response, error) {
var u string
if user != "" {
@@ -67,10 +67,10 @@ func (s *UsersService) ListFollowing(user string, opt *ListOptions) ([]*User, *R
return users, resp, nil
}
-// IsFollowing checks if "user" is following "target". Passing the empty
+// IsFollowing checks if "user" is following "target". Passing the empty
// string for "user" will check if the authenticated user is following "target".
//
-// GitHub API docs: http://developer.github.com/v3/users/followers/#check-if-you-are-following-a-user
+// GitHub API docs: https://developer.github.com/v3/users/followers/#check-if-you-are-following-a-user
func (s *UsersService) IsFollowing(user, target string) (bool, *Response, error) {
var u string
if user != "" {
@@ -91,7 +91,7 @@ func (s *UsersService) IsFollowing(user, target string) (bool, *Response, error)
// Follow will cause the authenticated user to follow the specified user.
//
-// GitHub API docs: http://developer.github.com/v3/users/followers/#follow-a-user
+// GitHub API docs: https://developer.github.com/v3/users/followers/#follow-a-user
func (s *UsersService) Follow(user string) (*Response, error) {
u := fmt.Sprintf("user/following/%v", user)
req, err := s.client.NewRequest("PUT", u, nil)
@@ -104,7 +104,7 @@ func (s *UsersService) Follow(user string) (*Response, error) {
// Unfollow will cause the authenticated user to unfollow the specified user.
//
-// GitHub API docs: http://developer.github.com/v3/users/followers/#unfollow-a-user
+// GitHub API docs: https://developer.github.com/v3/users/followers/#unfollow-a-user
func (s *UsersService) Unfollow(user string) (*Response, error) {
u := fmt.Sprintf("user/following/%v", user)
req, err := s.client.NewRequest("DELETE", u, nil)
diff --git a/vendor/github.com/google/go-github/github/users_gpg_keys.go b/vendor/github.com/google/go-github/github/users_gpg_keys.go
index 08cfbed..1576365 100644
--- a/vendor/github.com/google/go-github/github/users_gpg_keys.go
+++ b/vendor/github.com/google/go-github/github/users_gpg_keys.go
@@ -58,7 +58,7 @@ func (s *UsersService) ListGPGKeys() ([]*GPGKey, *Response, error) {
return nil, resp, err
}
- return keys, resp, err
+ return keys, resp, nil
}
// GetGPGKey gets extended details for a single GPG key. It requires authentication
@@ -81,7 +81,7 @@ func (s *UsersService) GetGPGKey(id int) (*GPGKey, *Response, error) {
return nil, resp, err
}
- return key, resp, err
+ return key, resp, nil
}
// CreateGPGKey creates a GPG key. It requires authenticatation via Basic Auth
@@ -106,7 +106,7 @@ func (s *UsersService) CreateGPGKey(armoredPublicKey string) (*GPGKey, *Response
return nil, resp, err
}
- return key, resp, err
+ return key, resp, nil
}
// DeleteGPGKey deletes a GPG key. It requires authentication via Basic Auth or
diff --git a/vendor/github.com/google/go-github/github/users_keys.go b/vendor/github.com/google/go-github/github/users_keys.go
index 59b1dc2..ebc333f 100644
--- a/vendor/github.com/google/go-github/github/users_keys.go
+++ b/vendor/github.com/google/go-github/github/users_keys.go
@@ -20,10 +20,10 @@ func (k Key) String() string {
return Stringify(k)
}
-// ListKeys lists the verified public keys for a user. Passing the empty
+// ListKeys lists the verified public keys for a user. Passing the empty
// string will fetch keys for the authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/users/keys/#list-public-keys-for-a-user
+// GitHub API docs: https://developer.github.com/v3/users/keys/#list-public-keys-for-a-user
func (s *UsersService) ListKeys(user string, opt *ListOptions) ([]*Key, *Response, error) {
var u string
if user != "" {
@@ -52,7 +52,7 @@ func (s *UsersService) ListKeys(user string, opt *ListOptions) ([]*Key, *Respons
// GetKey fetches a single public key.
//
-// GitHub API docs: http://developer.github.com/v3/users/keys/#get-a-single-public-key
+// GitHub API docs: https://developer.github.com/v3/users/keys/#get-a-single-public-key
func (s *UsersService) GetKey(id int) (*Key, *Response, error) {
u := fmt.Sprintf("user/keys/%v", id)
@@ -67,12 +67,12 @@ func (s *UsersService) GetKey(id int) (*Key, *Response, error) {
return nil, resp, err
}
- return key, resp, err
+ return key, resp, nil
}
// CreateKey adds a public key for the authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/users/keys/#create-a-public-key
+// GitHub API docs: https://developer.github.com/v3/users/keys/#create-a-public-key
func (s *UsersService) CreateKey(key *Key) (*Key, *Response, error) {
u := "user/keys"
@@ -87,12 +87,12 @@ func (s *UsersService) CreateKey(key *Key) (*Key, *Response, error) {
return nil, resp, err
}
- return k, resp, err
+ return k, resp, nil
}
// DeleteKey deletes a public key.
//
-// GitHub API docs: http://developer.github.com/v3/users/keys/#delete-a-public-key
+// GitHub API docs: https://developer.github.com/v3/users/keys/#delete-a-public-key
func (s *UsersService) DeleteKey(id int) (*Response, error) {
u := fmt.Sprintf("user/keys/%v", id)