Skip to content

Commit

Permalink
Remove Repository.get_protected_branch (#871)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
s-t-e-v-e-n-k authored and sfdye committed Aug 20, 2018
1 parent 310d073 commit 49db6f8
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions github/Repository.py
Expand Up @@ -1311,19 +1311,6 @@ def get_branch(self, branch):
)
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>`_
Expand Down

0 comments on commit 49db6f8

Please sign in to comment.