0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-12 05:37:26 +08:00
discourse/plugins/discourse-github/app/jobs/regular/create_github_linkback.rb
2025-07-22 15:07:59 +02:00

12 lines
350 B
Ruby
Vendored

# frozen_string_literal: true
module Jobs
class CreateGithubLinkback < ::Jobs::Base
def execute(args)
return unless SiteSetting.enable_discourse_github_plugin?
return unless SiteSetting.github_linkback_enabled?
return if (post = Post.find_by_id(args[:post_id])).blank?
GithubLinkback.new(post).create
end
end
end