Skip to content

Commit 7c9bccc

Browse files
committed
dont use min.len = 1
1 parent 9b93c65 commit 7c9bccc

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

R/check_changes_for_autoapproval.R

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,10 @@ check_changes_for_autoapproval <- function(
2323
) {
2424
checkmate::assert_string(gh_actor)
2525
checkmate::assert_string(base_hub_path)
26-
checkmate::assert_character(
27-
changed_files,
28-
min.len = 1,
29-
info = "Empty PRs cannot be autoapproved. At least one file must be changed in the pull request."
30-
)
26+
checkmate::assert_character(changed_files)
27+
if (length(changed_files) < 1) {
28+
cli::cli_abort("Empty PRs cannot be autoapproved. At least one file must be changed in the pull request.")
29+
}
3130
changed_files_tbl <- tibble::tibble(
3231
full_path = changed_files
3332
) |>

0 commit comments

Comments
 (0)