File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 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
1818# '
1919# ' @export
2020check_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" ) | >
Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments