mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 03:41:08 +00:00
Remove Repository.get_protected_branch (#871)
With both the custom Accept header and the new code that supports the new Branch Protection API, Repository.get_protected_branch() is no longer required, and it also was never tested, so remove it.
This commit is contained in:
committed by
Wan Liuyang
parent
310d0733ee
commit
49db6f8771
@@ -1311,19 +1311,6 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
)
|
||||
return github.Branch.Branch(self._requester, headers, data, completed=True)
|
||||
|
||||
def get_protected_branch(self, branch):
|
||||
"""
|
||||
:calls: `GET /repos/:owner/:repo/branches/:branch <https://developer.github.com/v3/repos/#response-10>`_
|
||||
:param branch: string
|
||||
:rtype: :class:`github.Branch.Branch`
|
||||
"""
|
||||
assert isinstance(branch, (str, unicode)), branch
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
"GET",
|
||||
self.url + "/branches/" + branch
|
||||
)
|
||||
return github.Branch.Branch(self._requester, headers, data, completed=True)
|
||||
|
||||
def get_branches(self):
|
||||
"""
|
||||
:calls: `GET /repos/:owner/:repo/branches <http://developer.github.com/v3/repos>`_
|
||||
|
||||
Reference in New Issue
Block a user