mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
DEV: Add reviewables:populate rake task (#30540)
Adds a new reviewables:populate rake task that works in a similar fashion to the existing *:populate rake tasks. The rake task creates pending reviewable of all core types, with possibility for plugins to extend the task to populate their own reviewable types.
This commit is contained in:
12
lib/discourse_dev/reviewable_post.rb
Normal file
12
lib/discourse_dev/reviewable_post.rb
Normal file
@ -0,0 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "discourse_dev/reviewable"
|
||||
require "faker"
|
||||
|
||||
module DiscourseDev
|
||||
class ReviewablePost < Reviewable
|
||||
def populate!
|
||||
@posts.sample(2).each { |post| ::ReviewablePost.queue_for_review(post) }
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user