mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Fix Organization.add_to_members() role passing (#1039)
* Fix role passing * Fix typo * Fix another typo * Move parameter to JSON payload * Move parameter to JSON payload * Add content type * Add content type * Double Quotes * Double quotes
This commit is contained in:
@@ -313,12 +313,12 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
assert isinstance(role, (str, unicode)), role
|
||||
assert isinstance(member, github.NamedUser.NamedUser), member
|
||||
url_parameters = {
|
||||
"role": role,
|
||||
}
|
||||
put_parameters = {}
|
||||
if role is not github.GithubObject.NotSet:
|
||||
put_parameters["role"] = role
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
"PUT",
|
||||
self.url + "/memberships/" + member._identity, parameters=url_parameters
|
||||
self.url + "/memberships/" + member._identity, input=put_parameters
|
||||
)
|
||||
|
||||
def add_to_public_members(self, public_member):
|
||||
|
||||
Reference in New Issue
Block a user