FEATURE: Admin plugin list redesign (#24363)

* Remove checkmark for official plugins
* Add author for plugin, which is By Discourse for all discourse
  and discourse-org github plugins
* Link to meta topic instead of github repo
* Add experimental flag for plugin metadata and show this as a
  badge on the plugin list if present

---------

Co-authored-by: chapoi <101828855+chapoi@users.noreply.github.com>
This commit is contained in:
Martin Brennan
2023-11-21 09:37:11 +10:00
committed by GitHub
parent 10b546d8c7
commit e37fb3042d
16 changed files with 320 additions and 119 deletions

View File

@ -516,6 +516,14 @@ class Plugin::Instance
@git_repo ||= GitRepo.new(directory, name)
end
def discourse_owned?
parsed_commit_url = UrlHelper.relaxed_parse(self.commit_url)
return false if !parsed_commit_url
github_org = parsed_commit_url.path.split("/")[1]
(github_org == "discourse" || github_org == "discourse-org") &&
parsed_commit_url.host == "github.com"
end
# A proxy to `DiscourseEvent.on` which does nothing if the plugin is disabled
def on(event_name, &block)
DiscourseEvent.on(event_name) { |*args, **kwargs| block.call(*args, **kwargs) if enabled? }