mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 03:41:08 +00:00
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:
committed by
Wan Liuyang
parent
b0fc5da5ae
commit
b1e9ae68a2
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user