mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 03:41:08 +00:00
added repository collaborator invitation
This commit is contained in:
@@ -673,8 +673,13 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
"PUT",
|
||||
self.url + "/collaborators/" + collaborator
|
||||
self.url + "/collaborators/" + collaborator,
|
||||
headers={'Accept': 'application/vnd.github.swamp-thing-preview+json'}
|
||||
)
|
||||
# return an invitation object if there's data returned by the API. If data is empty
|
||||
# there's a pending invitation for the given user.
|
||||
return github.Invitation.Invitation(self._requester, headers, data, completed=True) if \
|
||||
data is not None else None
|
||||
|
||||
def compare(self, base, head):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user