From ec311d23a3916acdd57524c42f4fa8f63647b456 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20L=C3=B6ffler?= Date: Wed, 16 Oct 2024 16:52:08 +0200 Subject: [PATCH] Define 'PATCHSTACK.MAIL.DECAY.THRESHOLD' as Duration object MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Löffler --- util-data.R | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/util-data.R b/util-data.R index 6edc899b..f137a928 100644 --- a/util-data.R +++ b/util-data.R @@ -25,7 +25,7 @@ ## Copyright 2021 by Johannes Hostert ## Copyright 2021 by Mirabdulla Yusifli ## Copyright 2022 by Jonathan Baumann -## Copyright 2022-2023 by Maximilian Löffler +## Copyright 2022-2024 by Maximilian Löffler ## Copyright 2024 by Leo Sendelbach ## All Rights Reserved. @@ -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", @@ -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