Skip to content

Commit

Permalink
Update flow based on @Bisaloo comments
Browse files Browse the repository at this point in the history
  • Loading branch information
chartgerink authored and Bisaloo committed Oct 15, 2024
1 parent 57aec53 commit e08278f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/collect-contributors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
packages: |
gh
allcontributors
dplyr
- name: Collect contributor data
run: Rscript _scripts/collect_contributor_data.R
Expand Down
16 changes: 9 additions & 7 deletions _scripts/collect_contributor_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,22 @@ repos <- lapply(repos, function(x) {
})

ctbs <- do.call(rbind, repos)
# Write out raw contributor data
write.csv(ctbs, file = "_data/raw_epiverse_contributors.csv",
row.names = FALSE)

# Retain only relevant info for about page
ctbs <- ctbs[, c("logins", "avatar")]
# Remove duplicates
result <- ctbs[!duplicated(ctbs$logins), ]
ctbs <- ctbs |>
dplyr::summarise(
type = toString(type),
repo = toString(repo),
avatar = toString(avatar),
.by = logins
)

# Use lapply to get user data and create dataframes
df_list <- lapply(included_handles, function(x) {
user <- gh("GET /users/:username", username = x)
data.frame(
logins = user$login,
type = NA,
repo = NA,
avatar = user$avatar_url
)
})
Expand Down

0 comments on commit e08278f

Please sign in to comment.