Skip to content

Commit

Permalink
adding current_commit arg to write_update_commit
Browse files Browse the repository at this point in the history
  • Loading branch information
brycefrank committed Sep 30, 2024
1 parent e243e65 commit 5f53e96
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/mongo.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ get_last_update_commit <- function(update_con) {
}
}

write_update_commit <- function(update_con) {
current_commit <- system("git rev-parse HEAD", intern = TRUE)
write_update_commit <- function(update_con, current_commit = NULL) {
if(!is.null(current_commit)) {
current_commit <- system("git rev-parse HEAD", intern = TRUE)
}

insert_obj <- list(
datetime = as.integer(Sys.time()) |> jsonlite::unbox(),
Expand Down

0 comments on commit 5f53e96

Please sign in to comment.