Skip to content

Commit

Permalink
Update provenance to use latest commit for this file instead of entir…
Browse files Browse the repository at this point in the history
…e repo
  • Loading branch information
pranavanba committed Feb 7, 2024
1 parent 547a60c commit 4ebc84a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions staging_to_archive.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ if (!is.null(synFindEntityId(validated_date, config::get("PARQUET_FOLDER_ARCHIVE

# Index each file in Synapse
latest_commit <- gh::gh("/repos/:owner/:repo/commits/main", owner = "Sage-Bionetworks", repo = "recover-parquet-external")
latest_commit_tree_url <- latest_commit$html_url %>% stringr::str_replace("commit", "tree")
# latest_commit_tree_url <- latest_commit$html_url %>% stringr::str_replace("commit", "tree")
latest_commit_this_file <- paste0(latest_commit$html_url %>% stringr::str_replace("commit", "blob"), "/staging_to_archive.R")

if(nrow(synapse_manifest_to_upload) > 0){
for(file_number in seq_len(nrow(synapse_manifest_to_upload))){
Expand All @@ -126,7 +127,7 @@ if (!is.null(synFindEntityId(validated_date, config::get("PARQUET_FOLDER_ARCHIVE
activityName = "Indexing",
activityDescription = "Indexing external parquet datasets",
used = PARQUET_FOLDER_INTERNAL,
executed = latest_commit_tree_url)
executed = latest_commit_this_file)

}
}
Expand Down

0 comments on commit 4ebc84a

Please sign in to comment.