Skip to content

Commit

Permalink
Add size
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Feb 5, 2024
1 parent 9d959ca commit be3581e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions R/oldies.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,20 @@ find_old_registries <- function(){
}
oldies <- subset(installs, basename(installs$registry) != sprintf('%s.r-universe.dev', installs$name))
oldies <- subset(oldies, basename(oldies$registry) != 'cran-to-git')
oldies$size <- sapply(oldies$name, count_packages)
return(oldies)
}

count_packages <- function(universe){
length(jsonlite::fromJSON(sprintf('https://%s.r-universe.dev/api/ls', universe)))
}

search_oldies <- function(){
query <- curl::curl_escape('org:r-universe path:.gitmodules /universe')
out <- gh::gh('/search/code?type=code&q=org%3Ar-universe%20%2Funiverse', .limit = 1000)
sapply(out$items, function(x){x$repository$name})
}

issue_title <- function(name){
sprintf("Action required: please rename this repo to: %s.r-universe.dev", name)
}
Expand Down

0 comments on commit be3581e

Please sign in to comment.