Skip to content

Commit 805d253

Browse files
committed
update col name
1 parent 039bd9d commit 805d253

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

R/check_authorized_users.R

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@ check_authorized_users <- function(
3333
na.omit(.data$designated_github_users)
3434
),
3535
.groups = "drop"
36-
)
36+
) |>
37+
dplyr::rename(dir = "model_id")
3738

38-
changed_dirs_tbl <- tibble::tibble(model_id = changed_dirs)
39+
changed_dirs_tbl <- tibble::tibble(dir = changed_dirs)
3940

4041
authorization_check <- changed_dirs_tbl |>
41-
dplyr::left_join(dir_users_map, by = "model_id") |>
42+
dplyr::left_join(dir_users_map, by = "dir") |>
4243
dplyr::mutate(
4344
actor_authorized = purrr::map2_lgl(
4445
.data$authorized_users,
@@ -61,19 +62,19 @@ check_authorized_users <- function(
6162
is.na(.data$authorized_users) ~
6263
paste0(
6364
"'",
64-
.data$model_id,
65+
.data$dir,
6566
"' is not authorized for modification."
6667
),
6768
!.data$has_authorized_users ~
6869
paste0(
6970
"Changes found in '",
70-
.data$model_id,
71+
.data$dir,
7172
"/'; no authorized users listed."
7273
),
7374
TRUE ~
7475
paste0(
7576
"Only the following users can modify: '",
76-
.data$model_id,
77+
.data$dir,
7778
"/': ",
7879
purrr::map_chr(
7980
.data$authorized_users,

0 commit comments

Comments
 (0)