Last active
November 29, 2019 10:55
-
-
Save gadenbuie/36c428911ae3be34c876f3af0cc8e860 to your computer and use it in GitHub Desktop.
Get My Starred GitHub Repos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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