Skip to content

Commit

Permalink
Removed gitr2 library call
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidRach committed Dec 26, 2024
1 parent 491b1c7 commit 7b980f5
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
14 changes: 7 additions & 7 deletions TheScript_3L.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ WorkingDirectory <- file.path("C:", "DailyQC", "InstrumentQC")

setwd(WorkingDirectory)

message("This is part of the UMGCC FCSS automated instrument QC proccess. It runs automatically at 10 AM, taking about a minute. Please ignore, the window will close on its own once files are copied. Thanks!")
#message("This is part of the UMGCC FCSS automated instrument QC proccess. It runs automatically at 10 AM, taking about a minute. Please ignore, the window will close on its own once files are copied. Thanks!")

AnyFlags <- list.files(WorkingDirectory, pattern="Flag.csv", full.names=TRUE)

Expand All @@ -16,9 +16,9 @@ Today <- as.Date(Today)

if (length(AnyFlags) == 0){

library(git2r)
#library(git2r)
RepositoryPath <- WorkingDirectory
TheRepo <- repository(RepositoryPath)
TheRepo <- git2r::repository(RepositoryPath)
git2r::pull(TheRepo)

library(dplyr)
Expand Down Expand Up @@ -93,12 +93,12 @@ if (any(length(PotentialGainDays)|length(PotentialMFIDays) > 0)){

if (any(length(GainMatches)|length(MFIMatches) > 0)){
# Stage to Git
add(TheRepo, "*")
git2r::add(TheRepo, "*")

TheCommitMessage <- paste0("Update for ", Instrument, " on ", Today)
commit(TheRepo, message = TheCommitMessage)
cred <- cred_token(token = "GITHUB_PAT")
push(TheRepo, credentials = cred)
git2r::commit(TheRepo, message = TheCommitMessage)
cred <- git2r::cred_token(token = "GITHUB_PAT")
git2r::push(TheRepo, credentials = cred)
message("Done ", Today)
} else {message("No files to process ", Today)}
} else {message("No files to process ", Today)}
Expand Down
14 changes: 7 additions & 7 deletions TheScript_4L.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ WorkingDirectory <- file.path("C:", "DailyQC", "InstrumentQC")

setwd(WorkingDirectory)

message("This is part of the UMGCC FCSS automated instrument QC proccess. It runs automatically at 10 AM, taking about a minute. Please ignore, the window will close on its own once files are copied. Thanks!")
#message("This is part of the UMGCC FCSS automated instrument QC proccess. It runs automatically at 10 AM, taking about a minute. Please ignore, the window will close on its own once files are copied. Thanks!")

AnyFlags <- list.files(WorkingDirectory, pattern="Flag.csv", full.names=TRUE)

Expand All @@ -16,9 +16,9 @@ Today <- as.Date(Today)

if (length(AnyFlags) == 0){

library(git2r)
#library(git2r)
RepositoryPath <- WorkingDirectory
TheRepo <- repository(RepositoryPath)
TheRepo <- git2r::repository(RepositoryPath)
git2r::pull(TheRepo)

library(dplyr)
Expand Down Expand Up @@ -91,12 +91,12 @@ if (any(length(PotentialGainDays)|length(PotentialMFIDays) > 0)){

if (any(length(GainMatches)|length(MFIMatches) > 0)){
# Stage to Git
add(TheRepo, "*")
git2r::add(TheRepo, "*")

TheCommitMessage <- paste0("Update for ", Instrument, " on ", Today)
commit(TheRepo, message = TheCommitMessage)
cred <- cred_token(token = "GITHUB_PAT")
push(TheRepo, credentials = cred)
git2r::commit(TheRepo, message = TheCommitMessage)
cred <- git2r::cred_token(token = "GITHUB_PAT")
git2r::push(TheRepo, credentials = cred)
message("Done ", Today)
} else {message("No files to process ", Today)}
} else {message("No files to process ", Today)}
Expand Down
14 changes: 7 additions & 7 deletions TheScript_5L.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WorkingDirectory <- "C:/Users/Aurora/Documents/InstrumentQC"

setwd(WorkingDirectory)

message("This is part of the UMGCC FCSS automated instrument QC proccess. It runs automatically at 10 AM, taking about a minute. Please ignore, the window will close on its own once files are copied. Thanks!")
#message("This is part of the UMGCC FCSS automated instrument QC proccess. It runs automatically at 10 AM, taking about a minute. Please ignore, the window will close on its own once files are copied. Thanks!")

AnyFlags <- list.files(WorkingDirectory, pattern="Flag.csv", full.names=TRUE)

Expand All @@ -15,9 +15,9 @@ Today <- as.Date(Today)

if (length(AnyFlags) == 0){

library(git2r)
#library(git2r)
RepositoryPath <- "C:/Users/Aurora/Documents/InstrumentQC"
TheRepo <- repository(RepositoryPath)
TheRepo <- git2r::repository(RepositoryPath)
git2r::pull(TheRepo)

library(dplyr)
Expand Down Expand Up @@ -99,12 +99,12 @@ if (any(length(PotentialGainDays)|length(PotentialMFIDays) > 0)){

if (any(length(GainMatches)|length(MFIMatches) > 0)){
# Stage to Git
add(TheRepo, "*")
git2r::add(TheRepo, "*")

TheCommitMessage <- paste0("Update for ", Instrument, " on ", Today)
commit(TheRepo, message = TheCommitMessage)
cred <- cred_token(token = "GITHUB_PAT")
push(TheRepo, credentials = cred)
git2r::commit(TheRepo, message = TheCommitMessage)
cred <- git2r::cred_token(token = "GITHUB_PAT")
git2r::push(TheRepo, credentials = cred)
message("Done ", Today)
} else {message("No files to process ", Today)}
} else {message("No files to process ", Today)}
Expand Down
14 changes: 7 additions & 7 deletions TheScript_CS.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RepositoryPath <- file.path(Main, "Documents", "InstrumentQC")

setwd(RepositoryPath)

message("This is part of the UMGCC FCSS automated instrument QC proccess. It runs automatically at 10 AM, taking about a minute. Please ignore, the window will close on its own once files are copied. Thanks!")
#message("This is part of the UMGCC FCSS automated instrument QC proccess. It runs automatically at 10 AM, taking about a minute. Please ignore, the window will close on its own once files are copied. Thanks!")

AnyFlags <- list.files(RepositoryPath, pattern="Flag.csv", full.names=TRUE)

Expand All @@ -16,8 +16,8 @@ Today <- as.Date(Today)

if (length(AnyFlags) == 0){

library(git2r)
TheRepo <- repository(RepositoryPath)
#library(git2r)
TheRepo <- git2r::repository(RepositoryPath)
git2r::pull(TheRepo)

library(dplyr)
Expand Down Expand Up @@ -95,12 +95,12 @@ if (any(length(PotentialGainDays)|length(PotentialMFIDays) > 0)){

if (any(length(GainMatches)|length(MFIMatches) > 0)){
# Stage to Git
add(TheRepo, "*")
git2r::add(TheRepo, "*")

TheCommitMessage <- paste0("Update for ", Instrument, " on ", Today)
commit(TheRepo, message = TheCommitMessage)
cred <- cred_token(token = "GITHUB_PAT")
push(TheRepo, credentials = cred)
git2r::commit(TheRepo, message = TheCommitMessage)
cred <- git2r::cred_token(token = "GITHUB_PAT")
git2r::push(TheRepo, credentials = cred)
message("Done ", Today)
} else {message("No files to process ", Today)}
} else {message("No files to process ", Today)}
Expand Down

0 comments on commit 7b980f5

Please sign in to comment.