Branch protection methods no longer require loki (#775)

The Branch Protection API graduated September 1, 2017, so remove use of
the loki-preview+json header.
This commit is contained in:
Steve Kowalik
2018-04-30 10:10:32 +08:00
committed by Wan Liuyang
parent b0fc5da5ae
commit b1e9ae68a2
9 changed files with 38 additions and 40 deletions
+2 -4
View File
@@ -1252,8 +1252,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
assert isinstance(branch, (str, unicode)), branch
headers, data = self._requester.requestJsonAndCheck(
"GET",
self.url + "/branches/" + branch,
headers={'Accept': 'application/vnd.github.loki-preview+json'}
self.url + "/branches/" + branch
)
return github.Branch.Branch(self._requester, headers, data, completed=True)
@@ -2421,8 +2420,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
headers, data = self._requester.requestJsonAndCheck(
"PATCH",
self.url + "/branches/" + branch,
input=post_parameters,
headers={'Accept': 'application/vnd.github.loki-preview+json'}
input=post_parameters
)
def remove_from_collaborators(self, collaborator):