mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-02 03:26:06 +01:00
(refs #1777) Bump gist plugin to 4.11.0
This commit is contained in:
@@ -3,13 +3,17 @@ import scala.collection.JavaConverters._
|
||||
|
||||
object PluginsJson {
|
||||
|
||||
def parse(json: String): Seq[(String, String)] = {
|
||||
def parse(json: String): Seq[(String, String, String)] = {
|
||||
val value = Json.parse(json)
|
||||
value.asArray.values.asScala.map { plugin =>
|
||||
val obj = plugin.asObject.get("versions").asArray.asScala.head.asObject
|
||||
val pluginName = obj.get("file").asString.split("_2.12-").head
|
||||
val version = obj.get("version").asString
|
||||
(pluginName, version)
|
||||
val pluginObject = plugin.asObject
|
||||
val pluginName = "gitbucket-" + pluginObject.get("id").asString + "-plugin"
|
||||
|
||||
val latestVersionObject = pluginObject.get("versions").asArray.asScala.head.asObject
|
||||
val file = latestVersionObject.get("file").asString
|
||||
val version = latestVersionObject.get("version").asString
|
||||
|
||||
(pluginName, version, file)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user