From 30802e07b2d84fbc213b490d3402707dffe60096 Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Mon, 10 Apr 2017 21:18:42 +0100 Subject: update dependencies --- vendor/github.com/google/go-github/github/admin.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'vendor/github.com/google/go-github/github/admin.go') diff --git a/vendor/github.com/google/go-github/github/admin.go b/vendor/github.com/google/go-github/github/admin.go index f77b2a2..d0f055b 100644 --- a/vendor/github.com/google/go-github/github/admin.go +++ b/vendor/github.com/google/go-github/github/admin.go @@ -5,7 +5,10 @@ package github -import "fmt" +import ( + "context" + "fmt" +) // AdminService handles communication with the admin related methods of the // GitHub API. These API routes are normally only accessible for GitHub @@ -62,7 +65,7 @@ func (m UserLDAPMapping) String() string { // UpdateUserLDAPMapping updates the mapping between a GitHub user and an LDAP user. // // GitHub API docs: https://developer.github.com/v3/enterprise/ldap/#update-ldap-mapping-for-a-user -func (s *AdminService) UpdateUserLDAPMapping(user string, mapping *UserLDAPMapping) (*UserLDAPMapping, *Response, error) { +func (s *AdminService) UpdateUserLDAPMapping(ctx context.Context, user string, mapping *UserLDAPMapping) (*UserLDAPMapping, *Response, error) { u := fmt.Sprintf("admin/ldap/users/%v/mapping", user) req, err := s.client.NewRequest("PATCH", u, mapping) if err != nil { @@ -70,7 +73,7 @@ func (s *AdminService) UpdateUserLDAPMapping(user string, mapping *UserLDAPMappi } m := new(UserLDAPMapping) - resp, err := s.client.Do(req, m) + resp, err := s.client.Do(ctx, req, m) if err != nil { return nil, resp, err } @@ -81,7 +84,7 @@ func (s *AdminService) UpdateUserLDAPMapping(user string, mapping *UserLDAPMappi // UpdateTeamLDAPMapping updates the mapping between a GitHub team and an LDAP group. // // GitHub API docs: https://developer.github.com/v3/enterprise/ldap/#update-ldap-mapping-for-a-team -func (s *AdminService) UpdateTeamLDAPMapping(team int, mapping *TeamLDAPMapping) (*TeamLDAPMapping, *Response, error) { +func (s *AdminService) UpdateTeamLDAPMapping(ctx context.Context, team int, mapping *TeamLDAPMapping) (*TeamLDAPMapping, *Response, error) { u := fmt.Sprintf("admin/ldap/teams/%v/mapping", team) req, err := s.client.NewRequest("PATCH", u, mapping) if err != nil { @@ -89,7 +92,7 @@ func (s *AdminService) UpdateTeamLDAPMapping(team int, mapping *TeamLDAPMapping) } m := new(TeamLDAPMapping) - resp, err := s.client.Do(req, m) + resp, err := s.client.Do(ctx, req, m) if err != nil { return nil, resp, err } -- cgit v1.2.3