[ARVADOS-DEV] updated: 0bedacbf91e4bdf6791ca5fc2d5b006f9197d034

Git user git at public.arvados.org
Wed Mar 16 14:26:08 UTC 2022


Summary of changes:
 cmd/review-task-reminder/root.go | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

       via  0bedacbf91e4bdf6791ca5fc2d5b006f9197d034 (commit)
      from  f51562a1734488fc01e36c9a62d67e3a1612f385 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 0bedacbf91e4bdf6791ca5fc2d5b006f9197d034
Author: Ward Vandewege <ward at curii.com>
Date:   Wed Mar 16 10:25:36 2022 -0400

    Review reminder script: fix another edge case on the date the sprint
    turns over.
    
    refs #18813
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>

diff --git a/cmd/review-task-reminder/root.go b/cmd/review-task-reminder/root.go
index 4838ba2..9d3ab57 100644
--- a/cmd/review-task-reminder/root.go
+++ b/cmd/review-task-reminder/root.go
@@ -153,6 +153,7 @@ https://git.arvados.org/arvados-dev.git/cmd/review-task-reminder` +
 		if err != nil {
 			log.Fatalf(err.Error())
 		}
+		now := time.Date(time.Now().Year(), time.Now().Month(), time.Now().Day(), 0, 0, 0, 0, time.UTC)
 		// Find any current sprint(s)
 		for _, v := range versions {
 			// It must be "open"
@@ -167,7 +168,7 @@ https://git.arvados.org/arvados-dev.git/cmd/review-task-reminder` +
 			if err != nil {
 				log.Fatalf(err.Error())
 			}
-			if time.Now().After(dueDate) {
+			if dueDate.Before(now) {
 				continue
 			}
 			// The start date must be in the past (have to look up the Sprint object!)
@@ -183,7 +184,7 @@ https://git.arvados.org/arvados-dev.git/cmd/review-task-reminder` +
 			if err != nil {
 				log.Fatalf(err.Error())
 			}
-			if time.Now().Before(startDate) {
+			if startDate.After(now) {
 				continue
 			}
 			// Found a current sprint

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list