def delete_branch(self, repo, branch, prefix):
        """
        Deletes a branch.
        :param repo: github.Repository
        :param branch: string name of the branch to delete
        """
        # extra safeguard to make sure we are handling a bot branch here
        assert branch.startswith(prefix)
        ref = repo.get_git_ref("/".join(["heads", branch]))
        ref.delete()
Deletes a branch.
        :param repo: github.Repository
        :param branch: string name of the branch to delete