Skip to content

Commit

Permalink
update validation - run check
Browse files Browse the repository at this point in the history
  • Loading branch information
LucieContamin committed Apr 22, 2024
1 parent 6dca2dc commit bd8de72
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/validation.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ library(dplyr)
# Check if validation need to run
print(length(Sys.getenv("GH_COMMIT_SHA")))

if (length(Sys.getenv("GH_COMMIT_SHA")) > 0) {
if (length(Sys.getenv("GH_COMMIT_SHA")) > 1) {
test <- gh::gh(paste0("GET /repos/",
"midas-network/example_round-scenariohub/commits/",
Sys.getenv("GH_COMMIT_SHA")))
check <- grepl("data-processed/", unique(unlist(purrr::map(test$files,
"filename"))))
} else {
print(Sys.getenv("GH_COMMIT_SHA"))
check <- TRUE
}

Expand Down

0 comments on commit bd8de72

Please sign in to comment.