Skip to content

Commit

Permalink
Merge branch 'main' into val_test_3
Browse files Browse the repository at this point in the history
  • Loading branch information
LucieContamin committed Apr 22, 2024
2 parents f54dd50 + 08d872f commit 2b4d0b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jobs:
env:
GH_PR_NUMBER: ${{ github.event.pull_request.number }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_COMMIT_SHA: "none"

- name: Run Validation - Synchronize
if: ( github.event.action == 'synchronize' )
Expand Down
5 changes: 2 additions & 3 deletions code/validation.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ library(gh)
library(dplyr)

# Check if validation need to run
print(length(Sys.getenv("GH_COMMIT_SHA")))
print(nchar(Sys.getenv("GH_COMMIT_SHA")))

if (length(Sys.getenv("GH_COMMIT_SHA")) > 1) {
if (nchar(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 2b4d0b2

Please sign in to comment.