mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +08:00
FIX: Handle missing git repo details in plugin list (#24539)
Followup to e37fb3042d6f56a27a01614e57bc7029f472b0c9, in some cases we cannot get git information for the plugin folder (e.g. permission issues), so we need to only try and get information about it if commit_hash is present.
This commit is contained in:
@ -519,8 +519,9 @@ class Plugin::Instance
|
||||
end
|
||||
|
||||
def discourse_owned?
|
||||
return false if commit_hash.blank?
|
||||
parsed_commit_url = UrlHelper.relaxed_parse(self.commit_url)
|
||||
return false if !parsed_commit_url
|
||||
return false if parsed_commit_url.blank?
|
||||
github_org = parsed_commit_url.path.split("/")[1]
|
||||
(github_org == "discourse" || github_org == "discourse-org") &&
|
||||
parsed_commit_url.host == "github.com"
|
||||
|
Reference in New Issue
Block a user