Skip to content

Commit

Permalink
fix(deps): update module github.com/google/go-github/v67 to v68 (#1542)
Browse files Browse the repository at this point in the history
* fix(deps): update module github.com/google/go-github/v67 to v68

* fix: replace github.String with github.Ptr

* fix: replace github.Int64 and github.Int with github.Ptr

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Shunsuke Suzuki <[email protected]>
  • Loading branch information
renovate[bot] and suzuki-shunsuke authored Dec 23, 2024
1 parent 353d66d commit 616b30c
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion pkg/notifier/github/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pkg/notifier/github/comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/notifier/github/commits.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/notifier/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 19 additions & 19 deletions pkg/notifier/github/github_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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
Expand All @@ -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
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/notifier/github/label.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down

0 comments on commit 616b30c

Please sign in to comment.