def add_repository(self, url=None, repopath=None, localreference="master", remotereference="origin"): """ ``add_repository`` adds a new plugin repository for the manager to track. :param str url: URL to the git repository where the plugins are stored. :param str repopath: path to where the repository will be stored on disk locally :param str localreference: Optional reference to the local tracking branch typically "master" :param str remotereference: Optional reference to the remote tracking branch typically "origin" :return: Boolean value True if the repository was successfully added, False otherwise. :rtype: Boolean :Example: >>> mgr = RepositoryManager() >>> mgr.add_repository(url="https://github.com/vector35/community-plugins.git", repopath="myrepo", localreference="master", remotereference="origin") True >>> """ if not (isinstance(url, str) and isinstance(repopath, str) and isinstance(localreference, str) and isinstance(remotereference, str)): raise ValueError("Parameter is incorrect type") return core.BNRepositoryManagerAddRepository(self.handle, url, repopath, localreference, remotereference)
def add_repository(self, url=None, repopath=None): """ ``add_repository`` adds a new plugin repository for the manager to track. :param str url: URL to the plugins.json containing the records for this repository :param str repopath: path to where the repository will be stored on disk locally :return: Boolean value True if the repository was successfully added, False otherwise. :rtype: Boolean :Example: >>> mgr = RepositoryManager() >>> mgr.add_repository("https://raw.githubusercontent.com/Vector35/community-plugins/master/plugins.json", "community") True >>> """ if not isinstance(url, str) or not isinstance(repopath, str): raise ValueError("Parameter is incorrect type") return core.BNRepositoryManagerAddRepository(self.handle, url, repopath)