assume github as default

This commit is contained in:
Cloudburst 2022-08-31 10:02:30 +02:00
parent 17997e15c0
commit 2448a204df

View file

@ -60,6 +60,12 @@ abstract class CloudstreamExtension @Inject constructor(project: Project) {
.split("/") .split("/")
setRepo(split[0], split[1], "gitlab") setRepo(split[0], split[1], "gitlab")
} }
!url.startsWith("https://") -> { // assume default as github
val split = url
.removeSurrounding("/")
.split("/")
setRepo(split[0], split[1], "github")
}
else -> throw IllegalArgumentException("Unknown domain, please set repository via setRepo(user, repo, type)") else -> throw IllegalArgumentException("Unknown domain, please set repository via setRepo(user, repo, type)")
} }
} }