Skip to content

Commit

Permalink
Include message when PR contains commits to files not checked. Relate…
Browse files Browse the repository at this point in the history
…d to #35
  • Loading branch information
annakrystalli committed Sep 27, 2023
1 parent bab6f47 commit c04af40
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions R/validate_pr.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ validate_pr <- function(hub_path = ".", gh_repo, pr_number,
validations <<- c(validations, list(e))
})

validated_files <- c(model_output_files, model_metadata_files)
if (length(pr_filenames) != length(validated_files)) {
validated_idx <- purrr::map_int(validated_files,
~grep(.x, pr_files, fixed = TRUE)
)
cli::cli_inform(
"PR contains commits to additional files which have not been checked:
{.val {pr_filenames[-validated_idx]}}.")
}

class(validations) <- c("hub_validations", "list")
return(validations)
}
Expand Down

0 comments on commit c04af40

Please sign in to comment.