Skip to content

Instantly share code, notes, and snippets.

@gadenbuie
Last active November 29, 2019 10:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gadenbuie/36c428911ae3be34c876f3af0cc8e860 to your computer and use it in GitHub Desktop.
Save gadenbuie/36c428911ae3be34c876f3af0cc8e860 to your computer and use it in GitHub Desktop.
Get My Starred GitHub Repos
if (!requireNamespace("gh", quietly = TRUE)) {
install.packages("gh")
}
if (!requireNamespace("roomba", quietly = TRUE)) {
library(devtools)
install_github("ropenscilabs/roomba")
}
library(dplyr)
gh::gh("/user/starred") %>%
roomba::roomba(
cols = c("name", "full_name", "html_url", "homepage", "description",
"git_url", "stargazers_count", "watchers_count",
"open_issues_count", "created_at", "updated_at")
) %>%
mutate(
name = glue::glue('<a href="{homepage}">{name}</a>'),
full_name = glue::glue('<a href="{html_url}">{full_name}</a>')
) %>%
mutate_at(vars(ends_with("_at")), lubridate::ymd_hms) %>%
mutate_at(vars(ends_with("_at")), strftime, format = "%F") %>%
select(
Name = name,
Repo = full_name,
Description = description,
Stars = stargazers_count,
Watchers = watchers_count,
`Open Issues` = open_issues_count,
Created = created_at,
Updated = updated_at,
`git url` = git_url
) %>%
DT::datatable(filter = "top", escape = FALSE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment