Skip to content

Commit 675b6c1

Browse files
committed
Created method to add user to an organization
1 parent 4176d3e commit 675b6c1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/Github/Api/Organization/Members.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ public function conceal($organization, $username)
4646
return $this->delete('orgs/'.rawurlencode($organization).'/public_members/'.rawurlencode($username));
4747
}
4848

49+
/*
50+
* Add user to organization
51+
*/
52+
public function add($organization, $username)
53+
{
54+
return $this->put('orgs/'.rawurlencode($organization).'/memberships/'.rawurlencode($username));
55+
}
56+
4957
public function remove($organization, $username)
5058
{
5159
return $this->delete('orgs/'.rawurlencode($organization).'/members/'.rawurlencode($username));

0 commit comments

Comments
 (0)