diff --git a/AUTHORS.rst b/AUTHORS.rst index e5d6c5184..672597be2 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -188,3 +188,5 @@ Contributors - Dimitri Merejkowsky (@dmerejkowsky) - Erico Fusco (@ericofusco) + +- Ben Jefferies (@benjefferies) diff --git a/src/github3/repos/branch.py b/src/github3/repos/branch.py index 86fb55add..ac96c6b48 100644 --- a/src/github3/repos/branch.py +++ b/src/github3/repos/branch.py @@ -407,7 +407,7 @@ def _update_attributes(self, protection): def enable(self): """Enable Admin enforcement for protected branch.""" resp = self._post( - self._api, headers=BranchProtection.PREVIEW_HEADERS_MAP + self._api ) return self._boolean(resp, 200, 404) @@ -415,7 +415,7 @@ def enable(self): def disable(self): """Disable Admin enforcement for protected branch.""" resp = self._delete( - self._api, headers=BranchProtection.PREVIEW_HEADERS_MAP + self._api ) return self._boolean(resp, 204, 404) diff --git a/tests/unit/test_repos_branch_protection.py b/tests/unit/test_repos_branch_protection.py index 28edbf0d3..25badba12 100644 --- a/tests/unit/test_repos_branch_protection.py +++ b/tests/unit/test_repos_branch_protection.py @@ -34,7 +34,6 @@ def test_enable(self): self.instance.enable() self.post_called_with( enforce_admins_url_for(), - headers=BranchProtection.PREVIEW_HEADERS_MAP, ) def test_disable(self): @@ -42,7 +41,6 @@ def test_disable(self): self.instance.disable() self.delete_called_with( enforce_admins_url_for(), - headers=BranchProtection.PREVIEW_HEADERS_MAP, )
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: