-
Notifications
You must be signed in to change notification settings - Fork 289
Open
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behaviorgitgit, GitHub, and CI in generalgit, GitHub, and CI in general
Description
Hi I'm having trouble using usethis::use_github_release()
on a GHE host:
> usethis::use_github_release()
Error in `stop_bad_github_remote_config()` at usethis/R/utils-github.R:615:4:
! Unsupported GitHub remote configuration: 'no_github'
• Host = NA
• origin = <not configured>
• upstream = <not configured>
• Neither 'origin' nor 'upstream' is a GitHub repo.
Here is my remote (note no 'github' string is present in the hostname):
> gert::git_remote_list()
# A tibble: 1 × 2
name url
* <chr> <chr>
1 origin https://ghe-gsk-prod.metworx.com/account/reponame
I believe the source of the issue is in github_remote_list()
which contains the lines:
parsed <- parse_github_remotes(set_names(x$url, x$name))
# TODO: generalize here for GHE hosts that don't include 'github'
is_github <- grepl("github", parsed$host)
and since 'github' doesn't match anything in https://ghe-gsk-prod.metworx.com/account/reponame
, this causes the issue above. The TODO comment indicates that the author was aware.
This was introduced in commit 43f6d2d and I'd be grateful if this useful function could be made to work on non 'github' matching GHE host names!
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behaviorgitgit, GitHub, and CI in generalgit, GitHub, and CI in general