Skip to content

Commit

Permalink
accept full json repo urls in repo ui
Browse files Browse the repository at this point in the history
  • Loading branch information
az4521 committed Jan 9, 2024
1 parent 73711ef commit 72966b7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class RepoPresenter(
}

// Do not allow invalid formats
if (!name.matches(repoRegex)) {
if (!name.matches(repoRegex) && !name.matches(urlRegex)) {
Observable.just(Unit).subscribeFirst({ view, _ -> view.onRepoInvalidNameError() })
return
}
Expand Down Expand Up @@ -86,5 +86,7 @@ class RepoPresenter(
companion object {
val repoRegex =
"""^[a-zA-Z-_.]*?\/[a-zA-Z-_.]*?$""".toRegex()
val urlRegex =
"""^https://.*/index\.min\.json$""".toRegex()
}
}

0 comments on commit 72966b7

Please sign in to comment.