errbot.repo_manager module¶
- class errbot.repo_manager.BotRepoManager(storage_plugin: StoragePluginBase, plugin_dir: str, plugin_indexes: Tuple[str, ...])[source]¶
Bases:
StoreMixin
Manages the repo list, git clones/updates or the repos.
- __init__(storage_plugin: StoragePluginBase, plugin_dir: str, plugin_indexes: Tuple[str, ...]) None [source]¶
Make a repo manager. :type plugin_dir:
str
:type storage_plugin:StoragePluginBase
:param storage_plugin: where the manager store its state. :param plugin_dir: where on disk it will git clone the repos. :param plugin_indexes: a list of URL / path to get the json repo index.
- get_repo_from_index(repo_name: str) List[RepoEntry] [source]¶
Retrieve the list of plugins for the repo_name from the index.
- Parameters:
repo_name (
str
) – the name of the repo- Returns:
a list of RepoEntry
- install_repo(repo: str) str [source]¶
Install the repository from repo
- Return type:
str
- Parameters:
repo (
str
) –- The url, git url or path on disk of a repository. It can point to either a git repo or
a .tar.gz of a plugin
- Returns:
The path on disk where the repo has been installed on.
- Raises:
RepoException
if an error occured.
- class errbot.repo_manager.RepoEntry(entry_name, name, python, repo, path, avatar_url, documentation)¶
Bases:
tuple
- avatar_url¶
Alias for field number 5
- documentation¶
Alias for field number 6
- entry_name¶
Alias for field number 0
- name¶
Alias for field number 1
- path¶
Alias for field number 4
- python¶
Alias for field number 2
- repo¶
Alias for field number 3
- errbot.repo_manager.check_dependencies(req_path: Path) Tuple[str | None, Sequence[str]] [source]¶
This methods returns a pair of (message, packages missing). Or None, [] if everything is OK.
- errbot.repo_manager.makeEntry(repo_name: str, plugin_name: str, json_value: dict) RepoEntry [source]¶