Get a list of repositories for a given user or organization

get_repositories(org = "NOAA-FIMS", type = c("orgs", "users"))

Arguments

org

The name of the organization that contains the repo. This can also be a user name rather than an organization. The default is "NOAA-FIMS".

type

A string specifying if the org is an organization or if it is a user name. The default is an organization but users can also choose "users".

Value

A tibble is returned with eighty-two columns. The main columns of interest are:

  • login: A string with the provided GitHub user name or organization.

  • name: A string giving the name of the repository.

  • fork: A logical, specifying if the repository is a fork.

Examples

get_repositories("kellijohnson-NOAA", type = "users")
#> # A tibble: 27 × 81
#>        id node_id name  full_name private owner$login html_url description fork 
#>     <int> <chr>   <chr> <chr>     <lgl>   <list>      <chr>    <list>      <lgl>
#>  1 8.20e8 R_kgDO… .git… kellijoh… FALSE   <chr [1]>   https:/… <chr [1]>   FALSE
#>  2 4.68e7 MDEwOl… alas… kellijoh… FALSE   <chr [1]>   https:/… <chr [1]>   FALSE
#>  3 4.46e7 MDEwOl… AR-p… kellijoh… FALSE   <chr [1]>   https:/… <chr [1]>   FALSE
#>  4 7.24e8 R_kgDO… Brai… kellijoh… FALSE   <chr [1]>   https:/… <chr [1]>   TRUE 
#>  5 6.65e8 R_kgDO… depl… kellijoh… FALSE   <chr [1]>   https:/… <chr [1]>   TRUE 
#>  6 2.35e8 MDEwOl… Diri… kellijoh… FALSE   <chr [1]>   https:/… <chr [1]>   TRUE 
#>  7 9.54e8 R_kgDO… expl… kellijoh… FALSE   <chr [1]>   https:/… <chr [1]>   TRUE 
#>  8 9.27e8 R_kgDO… Fish… kellijoh… FALSE   <chr [1]>   https:/… <chr [1]>   TRUE 
#>  9 2.17e7 MDEwOl… git-… kellijoh… FALSE   <chr [1]>   https:/… <chr [1]>   FALSE
#> 10 3.05e7 MDEwOl… iwcc… kellijoh… FALSE   <chr [1]>   https:/… <chr [1]>   FALSE
#> # ℹ 17 more rows
#> # ℹ 90 more variables: owner$id <list>, $node_id <list>, $avatar_url <list>,
#> #   $gravatar_id <list>, $url <list>, $html_url <list>, $followers_url <list>,
#> #   $following_url <list>, $gists_url <list>, $starred_url <list>,
#> #   $subscriptions_url <list>, $organizations_url <list>, $repos_url <list>,
#> #   $events_url <list>, $received_events_url <list>, $type <list>,
#> #   $user_view_type <list>, $site_admin <list>, url <chr>, forks_url <chr>, …
data <- purrr::map_df(
  c("kellijohnson-NOAA", "msupernaw"),
  get_repositories,
  type = "users"
)
FIMS_repos <- get_repositories("NOAA-FIMS", "orgs")