inst/templates/use_ghe.R

#' Connect a local repo with {{name}}'s GitHub Enterprise
#'
#' This is a wrapper for `usethis::use_github` to make it easier to access
#' {{name}}'s instance of GitHub Enterprise.
#'
#' @inheritParams usethis::use_github
#' @seealso `usethis::use_github`
#' @export
#'
use_github_{{suffix}} <- function(organisation = NULL,
                                  private = FALSE,
                                  protocol = c("ssh", "https"),
                                  credentials = NULL,
                                  auth_token = github_{{suffix}}_pat(),
                                  host = "https://{{host}}") {

  usethis::use_github(
    organisation = organisation,
    private = private,
    protocol = protocol,
    credentials = credentials,
    auth_token = auth_token,
    host = host
  )
}
ijlyttle/ghentr documentation built on May 18, 2019, 3:41 a.m.