mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
FEATURE: Merge discourse-automation (#26432)
Automation (previously known as discourse-automation) is now a core plugin.
This commit is contained in:
17
plugins/automation/lib/plugin/instance.rb
Normal file
17
plugins/automation/lib/plugin/instance.rb
Normal file
@ -0,0 +1,17 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Plugin::Instance
|
||||
def add_automation_scriptable(name, &block)
|
||||
reloadable_patch { DiscourseAutomation::Scriptable.add(name, &block) }
|
||||
end
|
||||
|
||||
def add_automation_triggerable(name, &block)
|
||||
reloadable_patch { DiscourseAutomation::Triggerable.add(name, &block) }
|
||||
end
|
||||
|
||||
def add_triggerable_to_scriptable(triggerable, scriptable)
|
||||
reloadable_patch do
|
||||
DiscourseAutomation::Scriptable.add_plugin_triggerable(triggerable, scriptable)
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user