From 26b71cf42e215fbc68fc924733f45c9ab890115c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 1 Jan 2023 00:27:13 +0000 Subject: [PATCH 1/3] Update module github.com/urfave/cli/v2 to v2.23.7 --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 62c90a6..5373c73 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/go-git/go-git/v5 v5.4.2 - github.com/urfave/cli/v2 v2.23.5 + github.com/urfave/cli/v2 v2.23.7 ) require ( diff --git a/go.sum b/go.sum index 1266c80..13d0add 100644 --- a/go.sum +++ b/go.sum @@ -74,6 +74,8 @@ github.com/urfave/cli/v2 v2.23.0 h1:pkly7gKIeYv3olPAeNajNpLjeJrmTPYCoZWaV+2VfvE= github.com/urfave/cli/v2 v2.23.0/go.mod h1:1CNUng3PtjQMtRzJO4FMXBQvkGtuYRxxiR9xMa7jMwI= github.com/urfave/cli/v2 v2.23.5 h1:xbrU7tAYviSpqeR3X4nEFWUdB/uDZ6DE+HxmRU7Xtyw= github.com/urfave/cli/v2 v2.23.5/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc= +github.com/urfave/cli/v2 v2.23.7 h1:YHDQ46s3VghFHFf1DdF+Sh7H4RqhcM+t0TmZRJx4oJY= +github.com/urfave/cli/v2 v2.23.7/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc= github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= From bf78f33dac9c817d7898f29e14580df325f901ca Mon Sep 17 00:00:00 2001 From: miyado <10195648+hmiyado@users.noreply.github.com> Date: Sun, 1 Jan 2023 14:24:16 +0900 Subject: [PATCH 2/3] Fix test case not to fail when remote repository tags increase --- internal/core/git_util_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/core/git_util_test.go b/internal/core/git_util_test.go index 5aa7a93..27734a2 100644 --- a/internal/core/git_util_test.go +++ b/internal/core/git_util_test.go @@ -6,7 +6,7 @@ func TestQueryTagsShouldHaveTags(t *testing.T) { tags := QueryTags(repository) expectedTagNum := 60 - if len(tags) != expectedTagNum { + if len(tags) < expectedTagNum { for i := 0; i < len(tags); i++ { if tags[i] == nil { t.Logf("tags[%d] = nil", i) From 875eb1e03592bc89752eb17109b32ca599c9cbfb Mon Sep 17 00:00:00 2001 From: miyado <10195648+hmiyado@users.noreply.github.com> Date: Sun, 1 Jan 2023 16:48:44 +0900 Subject: [PATCH 3/3] Use epoch time to count lead time for changes of initial release --- internal/core/query_releases.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/core/query_releases.go b/internal/core/query_releases.go index 140417e..21fbe6b 100644 --- a/internal/core/query_releases.go +++ b/internal/core/query_releases.go @@ -135,7 +135,8 @@ func getIsRestoredAndLeadTimeForChangesByLocalGit( option *Option, ) (isRestored bool, leadTimeForChanges time.Duration) { source := sources[i] - since := "1900-01-01" + // Epoch time + since := "1970-01-01T00:00:00+0000" if i < len(sources)-1 { preReleaseCommit := sources[i+1].commit since = preReleaseCommit.Committer.When.Add(time.Second).Format("2006-01-02T15:04:05")