Method: Github::Client::Orgs::Teams#add_member

Defined in:
lib/github_api/client/orgs/teams.rb

#add_member(*args) ⇒ Object Also known as: add_team_member

Add a team member

In order to add a user to a team, the authenticated user must have ‘admin’ permissions to the team or be an owner of the org that the team is associated with.

Examples:

github = Github.new oauth_token: '...'
github.orgs.teams.add_member 'team-id', 'user-name'


223
224
225
226
227
228
# File 'lib/github_api/client/orgs/teams.rb', line 223

def add_member(*args)
  arguments(args, required: [:id, :user])

  put_request("/teams/#{arguments.id}/members/#{arguments.user}",
              arguments.params)
end