aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/google/go-github/github/orgs_teams.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/google/go-github/github/orgs_teams.go')
-rw-r--r--vendor/github.com/google/go-github/github/orgs_teams.go50
1 files changed, 25 insertions, 25 deletions
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.