Skip to content

Commit 5972f19

Browse files
committed
Upgrade go-github to v54
1 parent 8475df2 commit 5972f19

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.21
55
require (
66
github.com/bradleyfalzon/ghinstallation/v2 v2.6.0
77
github.com/gin-gonic/gin v1.9.1
8-
github.com/google/go-github/v43 v43.0.0
8+
github.com/google/go-github/v54 v54.0.0
99
github.com/prometheus/client_golang v1.16.0
1010
github.com/rs/zerolog v1.30.0
1111
github.com/stretchr/testify v1.8.4

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
6060
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
6161
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
6262
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
63-
github.com/google/go-github/v43 v43.0.0 h1:y+GL7LIsAIF2NZlJ46ZoC/D1W1ivZasT0lnWHMYPZ+U=
64-
github.com/google/go-github/v43 v43.0.0/go.mod h1:ZkTvvmCXBvsfPpTHXnH/d2hP9Y0cTbvN9kr5xqyXOIc=
6563
github.com/google/go-github/v53 v53.2.0 h1:wvz3FyF53v4BK+AsnvCmeNhf8AkTaeh2SoYu/XUvTtI=
6664
github.com/google/go-github/v53 v53.2.0/go.mod h1:XhFRObz+m/l+UCm9b7KSIC3lT3NWSXGt7mOsAWEloao=
65+
github.com/google/go-github/v54 v54.0.0 h1:OZdXwow4EAD5jEo5qg+dGFH2DpkyZvVsAehjvJuUL/c=
66+
github.com/google/go-github/v54 v54.0.0/go.mod h1:Sw1LXWHhXRZtzJ9LI5fyJg9wbQzYvFhW8W5P2yaAQ7s=
6767
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
6868
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
6969
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=

pkg/cli/cli.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"strings"
1313

1414
"github.com/bradleyfalzon/ghinstallation/v2"
15-
"github.com/google/go-github/v43/github"
15+
"github.com/google/go-github/v54/github"
1616
"github.com/pfnet-research/alertmanager-to-github/pkg/notifier"
1717
"github.com/pfnet-research/alertmanager-to-github/pkg/server"
1818
"github.com/pfnet-research/alertmanager-to-github/pkg/template"

pkg/notifier/github.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"strconv"
1010
"strings"
1111

12-
"github.com/google/go-github/v43/github"
12+
"github.com/google/go-github/v54/github"
1313
"github.com/pfnet-research/alertmanager-to-github/pkg/template"
1414
"github.com/pfnet-research/alertmanager-to-github/pkg/types"
1515
"github.com/prometheus/client_golang/prometheus"
@@ -127,7 +127,7 @@ func (n *GitHubNotifier) Notify(ctx context.Context, payload *types.WebhookPaylo
127127
Str("groupKey", payload.GroupKey).Msg("too many search result")
128128

129129
for _, i := range searchResult.Issues {
130-
if issue == nil || issue.GetCreatedAt().Before(i.GetCreatedAt()) {
130+
if issue == nil || issue.GetCreatedAt().Before(i.GetCreatedAt().Time) {
131131
issue = i
132132
}
133133
}
@@ -241,7 +241,7 @@ func (n *GitHubNotifier) cleanupIssues(ctx context.Context, owner, repo, alertID
241241
}
242242

243243
sort.Slice(issues, func(i, j int) bool {
244-
return issues[i].GetCreatedAt().Before(issues[j].GetCreatedAt())
244+
return issues[i].GetCreatedAt().Before(issues[j].GetCreatedAt().Time)
245245
})
246246

247247
latestIssue := issues[len(issues)-1]

0 commit comments

Comments
 (0)