vendor/bundle/ruby/2.6.0/gems/octokit-4.21.0/lib/octokit/client/organizations.rb
# Add team member
#
# Requires authenticated organization owner or member with team
# `admin` permission.
#
# @param team_id [Integer] Team id.
# @param user [String] GitHub username of new team member.
# @return [Boolean] True on successful addition, false otherwise.
# @see https://developer.github.com/v3/orgs/teams/#add-team-member
# @example
#   @client.add_team_member(100000, 'pengwynn')
#
# @example
#   # Opt-in to future behavior for this endpoint. Adds the member to the
#   # team if they're already an org member. If not, the method will return
#   # 422 and indicate the user should call the new Team Membership endpoint.
#   @client.add_team_member \
#     100000,
#     'pengwynn',
#     :accept => "application/vnd.github.the-wasp-preview+json"
# @see https://developer.github.com/changes/2014-08-05-team-memberships-api/
Add team member
Requires authenticated organization owner or member with team
`admin` permission.
Add team member Requires authenticated organization owner or member with team ` admin ` permission .
def add_team_member(team_id, user, options = {})
        boolean_from_response :put, "teams/#{team_id}/members/#{user}", options.merge({:name => user})
      end
def add_team_member ( team_id , user , options = { } ) boolean_from_response :put , "teams/#{team_id}/members/#{user}" , options . merge ( { :name => user } ) end
Add team member
Requires authenticated organization owner or member with team
`admin` permission.
Add team member Requires authenticated organization owner or member with team ` admin ` permission .
# There's a bug in this API call. The docs say to leave the body blank, # but it fails if the body is both blank and the content-length header # is not 0.
True on successful addition, false otherwise.
True on successful addition false otherwise .
Boolean
team_id
None
user
GitHub username of new team member.
GitHub username of new team member .
options
see
None
example
None
example
Opt-in to future behavior for this endpoint. Adds the member to the # team if they're already an org member. If not, the method will return # 422 and indicate the user should call the new Team Membership endpoint. @client.add_team_member \ 100000, 'pengwynn', :accept => "application/vnd.github.the-wasp-preview+json"
Opt - in to future behavior for this endpoint . Adds the member to the # team if they ' re already an org member . If not the method will return # 422 and indicate the user should call the new Team Membership endpoint . @client . add_team_member \ 100000 ' pengwynn ' : accept = > " application / vnd . github . the - wasp - preview + json "
see
None