From 49db6f87710be41c5275ad0ed13073ecd345a120 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 20 Aug 2018 19:25:32 +1000 Subject: [PATCH] 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. --- github/Repository.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/github/Repository.py b/github/Repository.py index 299ea21c..1ad9eaa2 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -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 `_ - :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 `_