Skip to content

Commit

Permalink
Style.
Browse files Browse the repository at this point in the history
  • Loading branch information
maciekbanas committed Jan 9, 2025
1 parent 0b9f584 commit 85d9fdd
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions R/EngineGraphQLGitLab.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ EngineGraphQLGitLab <- R6::R6Class(
response <- self$gql_response(
gql_query = user_or_org_query,
vars = list(
"username" = owner,
"username" = owner,
"grouppath" = owner
)
)
Expand Down Expand Up @@ -352,10 +352,10 @@ EngineGraphQLGitLab <- R6::R6Class(
repositories <- repo_data[["repositories"]]
files_structure <- purrr::map(repositories, function(repo) {
private$get_files_structure_from_repo(
org = org,
repo = repo,
org = org,
repo = repo,
pattern = pattern,
depth = depth
depth = depth
)
}, .progress = progress)
names(files_structure) <- repositories
Expand All @@ -367,18 +367,20 @@ EngineGraphQLGitLab <- R6::R6Class(
prepare_user_table = function(user_response) {
if (!is.null(user_response$data$user)) {
user_data <- user_response$data$user
user_data$name <- user_data$name %||% ""
user_data$starred_repos <- user_data$starred_repos$count
user_data$pull_requests <- user_data$pull_requests$count
user_data$reviews <- user_data$reviews$count
user_data$email <- user_data$email %||% ""
user_data$location <- user_data$location %||% ""
user_data$web_url <- user_data$web_url %||% ""
user_table <- tibble::as_tibble(user_data) %>%
user_data[["name"]] <- user_data$name %||% ""
user_data[["starred_repos"]] <- user_data$starred_repos$count
user_data[["pull_requests"]] <- user_data$pull_requests$count
user_data[["reviews"]] <- user_data$reviews$count
user_data[["email"]] <- user_data$email %||% ""
user_data[["location"]] <- user_data$location %||% ""
user_data[["web_url"]] <- user_data$web_url %||% ""
user_table <- tibble::as_tibble(user_data) |>
dplyr::mutate(commits = NA,
issues = NA) %>%
dplyr::relocate(c(commits, issues),
.after = starred_repos)
issues = NA) |>
dplyr::relocate(
c(commits, issues),
.after = starred_repos
)
} else {
user_table <- NULL
}
Expand Down

0 comments on commit 85d9fdd

Please sign in to comment.