MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / restore_branch

Method restore_branch

github/PullRequest.py:858–862  ·  view source on GitHub ↗

Convenience function that calls :meth:`Repository.create_git_ref` :rtype: :class:`github.GitRef.GitRef`

(self)

Source from the content-addressed store, hash-verified

856 return status == 204
857
858 def restore_branch(self) -> GitRef:
859 """
860 Convenience function that calls :meth:`Repository.create_git_ref` :rtype: :class:`github.GitRef.GitRef`
861 """
862 return self.head.repo.create_git_ref(f"refs/heads/{self.head.ref}", sha=self.head.sha)
863
864 def delete_branch(self, force: bool = False) -> None:
865 """

Callers 1

testRestoreBranchMethod · 0.80

Calls 1

create_git_refMethod · 0.80

Tested by

no test coverage detected