R/remoteInfo.R

Defines functions remoteInfo

Documented in remoteInfo

#' Look up remotes for repository
#' 
#' @param repo A git2r repository object
#' 
remoteInfo <- function(repo) {
  if(length(git2r::remotes(repo)) == 0) { return(NULL)}
  
  remote_string <- paste(git2r::remotes(repo), git2r::remote_url(repo), sep = ": ")
  
  results <- data.frame( Name = "Remote", Value = remote_string)
  
  return(results)
}

Try the envDocument package in your browser

Any scripts or data that you put into this service are public.

envDocument documentation built on Aug. 20, 2019, 1:03 a.m.