diff --git a/go.mod b/go.mod index b0c256f7..14c613a6 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.23.1 require ( github.com/Masterminds/sprig/v3 v3.3.0 github.com/google/go-cmp v0.6.0 - github.com/google/go-github/v67 v67.0.0 + github.com/google/go-github/v68 v68.0.0 github.com/mattn/go-colorable v0.1.13 github.com/shurcooL/githubv4 v0.0.0-20240429030203-be2daab69064 github.com/sirupsen/logrus v1.9.3 diff --git a/go.sum b/go.sum index 202f07d6..6f1c729e 100644 --- a/go.sum +++ b/go.sum @@ -16,8 +16,8 @@ github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7z github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-github/v67 v67.0.0 h1:g11NDAmfaBaCO8qYdI9fsmbaRipHNWRIU/2YGvlh4rg= -github.com/google/go-github/v67 v67.0.0/go.mod h1:zH3K7BxjFndr9QSeFibx4lTKkYS3K9nDanoI1NjaOtY= +github.com/google/go-github/v68 v68.0.0 h1:ZW57zeNZiXTdQ16qrDiZ0k6XucrxZ2CGmoTvcCyQG6s= +github.com/google/go-github/v68 v68.0.0/go.mod h1:K9HAUBovM2sLwM408A18h+wd9vqdLOEqTUCbnRIcx68= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= diff --git a/pkg/notifier/github/client.go b/pkg/notifier/github/client.go index 99255afa..baa7c406 100644 --- a/pkg/notifier/github/client.go +++ b/pkg/notifier/github/client.go @@ -6,7 +6,7 @@ import ( "os" "strings" - "github.com/google/go-github/v67/github" + "github.com/google/go-github/v68/github" "github.com/shurcooL/githubv4" "github.com/suzuki-shunsuke/tfcmt/v4/pkg/config" "github.com/suzuki-shunsuke/tfcmt/v4/pkg/terraform" diff --git a/pkg/notifier/github/comment.go b/pkg/notifier/github/comment.go index 85858914..703fee97 100644 --- a/pkg/notifier/github/comment.go +++ b/pkg/notifier/github/comment.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - "github.com/google/go-github/v67/github" + "github.com/google/go-github/v68/github" "github.com/shurcooL/githubv4" ) diff --git a/pkg/notifier/github/commits.go b/pkg/notifier/github/commits.go index fc97d4f4..4caeba30 100644 --- a/pkg/notifier/github/commits.go +++ b/pkg/notifier/github/commits.go @@ -4,7 +4,7 @@ import ( "context" "errors" - "github.com/google/go-github/v67/github" + "github.com/google/go-github/v68/github" ) // CommitsService handles communication with the commits related diff --git a/pkg/notifier/github/github.go b/pkg/notifier/github/github.go index c5188c7e..3c9bb871 100644 --- a/pkg/notifier/github/github.go +++ b/pkg/notifier/github/github.go @@ -3,7 +3,7 @@ package github import ( "context" - "github.com/google/go-github/v67/github" + "github.com/google/go-github/v68/github" ) // API is GitHub API interface diff --git a/pkg/notifier/github/github_test.go b/pkg/notifier/github/github_test.go index 051a70de..9e8f0f97 100644 --- a/pkg/notifier/github/github_test.go +++ b/pkg/notifier/github/github_test.go @@ -4,7 +4,7 @@ package github import ( "context" - "github.com/google/go-github/v67/github" + "github.com/google/go-github/v68/github" "github.com/suzuki-shunsuke/tfcmt/v4/pkg/terraform" ) @@ -56,19 +56,19 @@ func newFakeAPI() fakeAPI { return fakeAPI{ FakeIssuesCreateComment: func(ctx context.Context, number int, comment *github.IssueComment) (*github.IssueComment, *github.Response, error) { return &github.IssueComment{ - ID: github.Int64(371748792), - Body: github.String("comment 1"), + ID: github.Ptr(int64(371748792)), + Body: github.Ptr("comment 1"), }, nil, nil }, FakeIssuesListLabels: func(ctx context.Context, number int, opts *github.ListOptions) ([]*github.Label, *github.Response, error) { labels := []*github.Label{ { - ID: github.Int64(371748792), - Name: github.String("label 1"), + ID: github.Ptr(int64(371748792)), + Name: github.Ptr("label 1"), }, { - ID: github.Int64(371765743), - Name: github.String("label 2"), + ID: github.Ptr(int64(371765743)), + Name: github.Ptr("label 2"), }, } return labels, nil, nil @@ -81,42 +81,42 @@ func newFakeAPI() fakeAPI { }, FakeRepositoriesCreateComment: func(ctx context.Context, sha string, comment *github.RepositoryComment) (*github.RepositoryComment, *github.Response, error) { return &github.RepositoryComment{ - ID: github.Int64(28427394), - CommitID: github.String("04e0917e448b662c2b16330fad50e97af16ff27a"), - Body: github.String("comment 1"), + ID: github.Ptr(int64(28427394)), + CommitID: github.Ptr("04e0917e448b662c2b16330fad50e97af16ff27a"), + Body: github.Ptr("comment 1"), }, nil, nil }, FakeRepositoriesListCommits: func(ctx context.Context, opt *github.CommitsListOptions) ([]*github.RepositoryCommit, *github.Response, error) { commits := []*github.RepositoryCommit{ { - SHA: github.String("04e0917e448b662c2b16330fad50e97af16ff27a"), + SHA: github.Ptr("04e0917e448b662c2b16330fad50e97af16ff27a"), }, { - SHA: github.String("04e0917e448b662c2b16330fad50e97af16ff27b"), + SHA: github.Ptr("04e0917e448b662c2b16330fad50e97af16ff27b"), }, { - SHA: github.String("04e0917e448b662c2b16330fad50e97af16ff27c"), + SHA: github.Ptr("04e0917e448b662c2b16330fad50e97af16ff27c"), }, } return commits, nil, nil }, FakeRepositoriesGetCommit: func(ctx context.Context, sha string) (*github.RepositoryCommit, *github.Response, error) { return &github.RepositoryCommit{ - SHA: github.String(sha), + SHA: github.Ptr(sha), Commit: &github.Commit{ - Message: github.String(sha), + Message: github.Ptr(sha), }, }, nil, nil }, FakePullRequestsListPullRequestsWithCommit: func(ctx context.Context, sha string, opt *github.ListOptions) ([]*github.PullRequest, *github.Response, error) { return []*github.PullRequest{ { - State: github.String("open"), - Number: github.Int(1), + State: github.Ptr("open"), + Number: github.Ptr(1), }, { - State: github.String("closed"), - Number: github.Int(2), + State: github.Ptr("closed"), + Number: github.Ptr(2), }, }, nil, nil }, diff --git a/pkg/notifier/github/label.go b/pkg/notifier/github/label.go index 694b8f1f..c645eb11 100644 --- a/pkg/notifier/github/label.go +++ b/pkg/notifier/github/label.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "github.com/google/go-github/v67/github" + "github.com/google/go-github/v68/github" "github.com/sirupsen/logrus" "github.com/suzuki-shunsuke/tfcmt/v4/pkg/terraform" )