Skip to content

Commit c593113

Browse files
authored
feature #1018 allow assigning role to organisation members (luceos)
This PR was squashed before being merged into the 3.4.x-dev branch. Discussion ---------- This PR allows you to assign the `admin` role to new members of the organisation. Ref: https://docs.github.com/en/rest/reference/orgs#set-organization-membership-for-a-user Commits ------- eb4e3c2 allow assigning roles to organisation members 480b919 remove default value and role check
1 parent de96379 commit c593113

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Github/Api/Organization/Members.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ public function conceal($organization, $username)
5858
/*
5959
* Add user to organization
6060
*/
61-
public function add($organization, $username)
61+
public function add($organization, $username, array $params = [])
6262
{
63-
return $this->put('/orgs/'.rawurlencode($organization).'/memberships/'.rawurlencode($username));
63+
return $this->put('/orgs/'.rawurlencode($organization).'/memberships/'.rawurlencode($username), $params);
6464
}
6565

6666
public function addMember($organization, $username)

0 commit comments

Comments
 (0)