From bd8de72abaa4fba0a40e141c00129a2e3e7bd416 Mon Sep 17 00:00:00 2001 From: LucieContamin Date: Mon, 22 Apr 2024 14:12:45 -0400 Subject: [PATCH] update validation - run check --- code/validation.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/validation.R b/code/validation.R index b2a12ec..27d27ee 100644 --- a/code/validation.R +++ b/code/validation.R @@ -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 }