DEV: Return only valid repos
This will stop non-upgradeable plugins from showing up on the list. This mainly means core plugins like `poll` or `chat`
This commit is contained in:
parent
4c8593cf43
commit
b9b3c71c95
|
@ -21,7 +21,6 @@ module DockerManager
|
||||||
result[:fork] = true if result[:official] &&
|
result[:fork] = true if result[:official] &&
|
||||||
!r.url.starts_with?("https://github.com/discourse/")
|
!r.url.starts_with?("https://github.com/discourse/")
|
||||||
|
|
||||||
if r.valid?
|
|
||||||
result[:id] = r
|
result[:id] = r
|
||||||
.name
|
.name
|
||||||
.downcase
|
.downcase
|
||||||
|
@ -35,7 +34,6 @@ module DockerManager
|
||||||
result[:upgrading] = true
|
result[:upgrading] = true
|
||||||
result[:version] = r.upgrade_version
|
result[:version] = r.upgrade_version
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
|
@ -84,7 +84,8 @@ class DockerManager::GitRepo
|
||||||
|
|
||||||
Discourse.visible_plugins.each do |p|
|
Discourse.visible_plugins.each do |p|
|
||||||
next if p.name == "docker_manager"
|
next if p.name == "docker_manager"
|
||||||
repos << DockerManager::GitRepo.new(File.dirname(p.path), p.name)
|
repo = DockerManager::GitRepo.new(File.dirname(p.path), p.name)
|
||||||
|
repos << repo if repo.valid?
|
||||||
end
|
end
|
||||||
|
|
||||||
repos
|
repos
|
||||||
|
|
Loading…
Reference in New Issue