Skip to content

Commit

Permalink
Define 'PATCHSTACK.MAIL.DECAY.THRESHOLD' as Duration object
Browse files Browse the repository at this point in the history
Signed-off-by: Maximilian Löffler <[email protected]>
  • Loading branch information
maxloeffler committed Oct 17, 2024
1 parent 646c01a commit 7c525b9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions util-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
## Copyright 2021 by Johannes Hostert <[email protected]>
## Copyright 2021 by Mirabdulla Yusifli <[email protected]>
## Copyright 2022 by Jonathan Baumann <[email protected]>
## Copyright 2022-2023 by Maximilian Löffler <[email protected]>
## Copyright 2022-2024 by Maximilian Löffler <[email protected]>
## Copyright 2024 by Leo Sendelbach <[email protected]>
## All Rights Reserved.

Expand Down Expand Up @@ -113,7 +113,7 @@ DATASOURCE.TO.ARTIFACT.COLUMN = list(


## the maximum time difference between subsequent mails of a patchstack
PATCHSTACK.MAIL.DECAY.THRESHOLD = "30 seconds"
PATCHSTACK.MAIL.DECAY.THRESHOLD = lubridate::as.duration("30 seconds")

## configuration parameters that do not reset the environment when changed
CONF.PARAMETERS.NO.RESET.ENVIRONMENT = c("commit.messages",
Expand Down Expand Up @@ -283,8 +283,7 @@ ProjectData = R6::R6Class("ProjectData",
## of 'PATCHSTACK.MAIL.DECAY.THRESHOLD'
while (i < nrow(thread) && running) {
if (thread[1, "author.name"] == thread[i + 1, "author.name"] &&
thread[i + 1, "date"] - thread[i, "date"] <=
lubridate::as.duration(PATCHSTACK.MAIL.DECAY.THRESHOLD)) {
thread[i + 1, "date"] - thread[i, "date"] <= PATCHSTACK.MAIL.DECAY.THRESHOLD) {
i = i + 1
} else {
running = FALSE
Expand Down

0 comments on commit 7c525b9

Please sign in to comment.