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:
Osama Sayegh
2025-01-03 05:05:04 +03:00
committed by GitHub
parent 4aa7a89371
commit 5a55c9062a
10 changed files with 186 additions and 3 deletions

View File

@@ -13,6 +13,10 @@ class ReviewablePost < Reviewable
created_or_edited_by.has_trust_level?(TrustLevel[4])
return
end
queue_for_review(post)
end
def self.queue_for_review(post)
system_user = Discourse.system_user
needs_review!(