FEATURE: call hub API to update Discourse discover enrollment. (#25634)

Now forums can enroll their sites to be showcased in the Discourse [Discover](https://discourse.org/discover) directory. Once they enable the site setting `include_in_discourse_discover` to enroll their forum the `CallDiscourseHub` job will ping the `api.discourse.org/api/discover/enroll` endpoint. Then the Discourse Hub will fetch the basic details from the forum and add it to the review queue. If the site is approved then the forum details will be displayed in the `/discover` page.
This commit is contained in:
Vinoth Kannan
2024-02-23 11:42:28 +05:30
committed by GitHub
parent 207cb2052f
commit b3238bfc34
16 changed files with 102 additions and 9 deletions

View File

@ -67,7 +67,7 @@ RSpec.describe DiscourseUpdates do
end
it "queues a version check" do
expect_enqueued_with(job: :version_check) { version }
expect_enqueued_with(job: :call_discourse_hub) { version }
end
end
@ -76,7 +76,7 @@ RSpec.describe DiscourseUpdates do
context "with old version check data" do
shared_examples "queue version check and report that version is ok" do
it "queues a version check" do
expect_enqueued_with(job: :version_check) { version }
expect_enqueued_with(job: :call_discourse_hub) { version }
end
it "reports 0 missing versions" do
@ -105,7 +105,7 @@ RSpec.describe DiscourseUpdates do
shared_examples "when last_installed_version is old" do
it "queues a version check" do
expect_enqueued_with(job: :version_check) { version }
expect_enqueued_with(job: :call_discourse_hub) { version }
end
it "reports 0 missing versions" do