mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
FEATURE: Merge discourse-automation (#26432)
Automation (previously known as discourse-automation) is now a core plugin.
This commit is contained in:
@ -0,0 +1,13 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
key = "discourse_automation.triggerables.stalled_topic.durations"
|
||||
ids = %w[PT1H P1D P1W P2W P1M P3M P6M P1Y]
|
||||
duration_choices = ids.map { |id| { id: id, name: "#{key}.#{id}" } }
|
||||
|
||||
DiscourseAutomation::Triggerable.add(DiscourseAutomation::Triggers::STALLED_TOPIC) do
|
||||
field :categories, component: :categories
|
||||
field :tags, component: :tags
|
||||
field :stalled_after, component: :choices, extra: { content: duration_choices }, required: true
|
||||
|
||||
placeholder :topic_url
|
||||
end
|
Reference in New Issue
Block a user