assume github as default

This commit is contained in:
Cloudburst 2022-08-31 10:02:30 +02:00
parent 17997e15c0
commit 2448a204df
1 changed files with 6 additions and 0 deletions

View File

@ -60,6 +60,12 @@ abstract class CloudstreamExtension @Inject constructor(project: Project) {
.split("/")
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)")
}
}