Errbot: How can I import one plugin from another

125 Views Asked by At

In this case I have a simple JIRA plugin, I'd like to create another plugin that also interacts with JIRA via the first plugin. I have been trying variations of errbot.plugin_manager.get_plugin_obj_by_name('jira') but I haven't found the right way to do this.

1

There are 1 best solutions below

0
On BEST ANSWER

You are in luck, it just got implemented in the 4.3.0 version released yesterday:

Basically you need to declare the dependency in the .plug with DependsOn in the [Core] section then you can get the plugin object you depend on with self.get_plugin('pluginName').

https://github.com/errbotio/errbot/blob/master/docs/user_guide/plugin_development/dependencies.rst