Detect a URL on github.com
Examples
# Returns TRUE
is_github_url("https://github.com/hubverse-org/example-simple-forecast-hub")
#> [1] TRUE
is_github_url("https://github.com/hubverse-org/schemas/tree/main/v5.0.0")
#> [1] TRUE
# Returns FALSE
is_github_url("https://gitlab.com/hubverse-org/schemas/tree/main/v5.0.0")
#> [1] FALSE
raw_url <- paste0(
"https://raw.githubusercontent.com/hubverse-org/",
"example-simple-forecast-hub/refs/heads/main/hub-config/tasks.json"
)
is_github_url(raw_url)
#> [1] FALSE