We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e58ad4c commit 29e36caCopy full SHA for 29e36ca
src/main/kotlin/spp/protocol/platform/general/Service.kt
@@ -99,6 +99,21 @@ data class Service(
99
return copy(name = name)
100
}
101
102
+ fun withId(id: String?): Service {
103
+ if (id == null) return this
104
+ val definition = IDManager.ServiceID.analysisId(id)
105
+ if (name.contains("|")) {
106
+ val parts = name.split("|")
107
+ return copy(
108
+ name = parts[0],
109
+ environment = parts[1],
110
+ commitId = parts[2],
111
+ normal = definition.isReal
112
+ )
113
+ }
114
+ return copy(name = definition.name, normal = definition.isReal)
115
116
+
117
companion object {
118
119
@JvmStatic
0 commit comments