Skip to content

Commit

Permalink
Cleanup removed maintainer accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Aug 30, 2024
1 parent 8bdd819 commit dcdf1f5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions R/maintainerdb.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,15 @@ update_maintainers_csv <- function(){
json <- jsonlite::parse_json(rawToChar(res$content))
commit_email <- tolower(json$commit$author$email)
if(identical(commit_email, email)){
old_login <- db$login[i]
if(length(json$author$login)){
db$login[i] <<- json$author$login
} else if(!is.na(old_login)){
message(sprintf("Testing if %s still exists", old_login))
usertest <- curl::curl_fetch_memory(paste0('https://github.com/', old_login))
if(usertest$status_code == 404){
db$login[i] <<- NA_character_ #force remove if user no longer exists
}
}
} else {
message(sprintf("Metacran email mismatch for %s: %s / %s", pkg, commit_email, email))
Expand Down

0 comments on commit dcdf1f5

Please sign in to comment.