add different setRepo

This commit is contained in:
C10udburst 2022-08-08 12:08:53 +02:00
parent 07c70ccfbd
commit 8f5776e0f3

View file

@ -25,6 +25,14 @@ abstract class CloudstreamExtension @Inject constructor(project: Project) {
fun setRepo(user: String, repo: String) { fun setRepo(user: String, repo: String) {
repository = Repo(user, repo) repository = Repo(user, repo)
} }
fun setRepo(identifier: String) {
val split = identifier
.removePrefix("https://")
.removePrefix("github.com")
.removeSurrounding("/")
.split("/")
repository = Repo(split[0], split[1])
}
internal var pluginClassName: String? = null internal var pluginClassName: String? = null