added repository collaborator invitation

This commit is contained in:
Jannis Gebauer
2017-07-10 13:14:09 +02:00
parent b93d43df23
commit 4c64b28920
9 changed files with 151 additions and 4 deletions
+6 -1
View File
@@ -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):
"""