Skip to content

Commit eaee58f

Browse files
authored
Rename changed_dirs argument of check_authorized_users to changed_model_ids (#53)
* update var names across codebase * run devtools document
1 parent b944b2f commit eaee58f

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

R/check_authorized_users.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
#' directories.
33
#'
44
#' This function verifies whether a GitHub
5-
#' user is authorized to modify specific directories
5+
#' user is authorized to modify specific model IDs
66
#' in a Hub by checking the designated users in model
77
#' metadata.
88
#'
9-
#' @param changed_dirs Character vector. Names of directories
10-
#' whose contents have been modified.
9+
#' @param changed_model_ids Character vector. Model IDs that
10+
#' have been modified.
1111
#' @param gh_actor Character. GitHub username of the person
1212
#' making changes.
1313
#' @param base_hub_path Character. Path to the base hub
@@ -18,19 +18,19 @@
1818
#'
1919
#' @export
2020
check_authorized_users <- function(
21-
changed_dirs,
21+
changed_model_ids,
2222
gh_actor,
2323
base_hub_path
2424
) {
25-
checkmate::assert_character(changed_dirs, min.len = 1)
25+
checkmate::assert_character(changed_model_ids, min.len = 1)
2626
checkmate::assert_string(gh_actor)
2727
checkmate::assert_string(base_hub_path)
2828

2929
model_metadata <- hubData::load_model_metadata(base_hub_path) |>
3030
dplyr::mutate(is_model_dir = TRUE) |>
3131
dplyr::rename(dir = "model_id")
3232

33-
changed_dirs_tbl <- tibble::tibble(dir = changed_dirs)
33+
changed_dirs_tbl <- tibble::tibble(dir = changed_model_ids)
3434

3535
authorization_check <- changed_dirs_tbl |>
3636
dplyr::left_join(model_metadata, by = "dir", na_matches = "never") |>

R/check_changes_for_autoapproval.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ check_changes_for_autoapproval <- function(
6868
)
6969

7070
check_authorized_users(
71-
changed_dirs = changed_model_ids,
71+
changed_model_ids = changed_model_ids,
7272
gh_actor = gh_actor,
7373
base_hub_path = base_hub_path
7474
)

man/check_authorized_users.Rd

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)