From ec2844b75604b30df4ca517fcde429ff2d853481 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 24 Dec 2024 07:06:40 +0900 Subject: [PATCH] fix(deps): update module github.com/google/go-github/v67 to v68 (#1695) * fix(deps): update module github.com/google/go-github/v67 to v68 * fix: replace github.String with github.Ptr --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Shunsuke Suzuki --- go.mod | 2 +- go.sum | 4 ++-- pkg/github/client.go | 2 +- pkg/github/comment.go | 10 +++++----- pkg/github/pr.go | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 50768ebd..69a3e269 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.23.3 require ( github.com/Masterminds/sprig/v3 v3.3.0 github.com/expr-lang/expr v1.16.9 - 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 5fc264c9..8957ee9f 100644 --- a/go.sum +++ b/go.sum @@ -18,8 +18,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/github/client.go b/pkg/github/client.go index 8bf857bc..1019a26c 100644 --- a/pkg/github/client.go +++ b/pkg/github/client.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v67/github" + "github.com/google/go-github/v68/github" "github.com/shurcooL/githubv4" "golang.org/x/oauth2" ) diff --git a/pkg/github/comment.go b/pkg/github/comment.go index 09ee149f..4a8242b8 100644 --- a/pkg/github/comment.go +++ b/pkg/github/comment.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v67/github" + "github.com/google/go-github/v68/github" "github.com/sirupsen/logrus" ) @@ -38,14 +38,14 @@ type IssueComment struct { func (c *Client) sendIssueComment(ctx context.Context, cmt *Comment, body string) error { if cmt.CommentID != 0 { if _, _, err := c.issue.EditComment(ctx, cmt.Org, cmt.Repo, cmt.CommentID, &github.IssueComment{ - Body: github.String(body), + Body: github.Ptr(body), }); err != nil { return fmt.Errorf("edit a issue or pull request comment by GitHub API: %w", err) } return nil } if _, _, err := c.issue.CreateComment(ctx, cmt.Org, cmt.Repo, cmt.PRNumber, &github.IssueComment{ - Body: github.String(body), + Body: github.Ptr(body), }); err != nil { return fmt.Errorf("create a comment to issue or pull request by GitHub API: %w", err) } @@ -55,14 +55,14 @@ func (c *Client) sendIssueComment(ctx context.Context, cmt *Comment, body string func (c *Client) sendCommitComment(ctx context.Context, cmt *Comment, body string) error { if cmt.CommentID != 0 { if _, _, err := c.repo.UpdateComment(ctx, cmt.Org, cmt.Repo, cmt.CommentID, &github.RepositoryComment{ - Body: github.String(body), + Body: github.Ptr(body), }); err != nil { return fmt.Errorf("update a commit comment by GitHub API: %w", err) } return nil } if _, _, err := c.repo.CreateComment(ctx, cmt.Org, cmt.Repo, cmt.SHA1, &github.RepositoryComment{ - Body: github.String(body), + Body: github.Ptr(body), }); err != nil { return fmt.Errorf("create a commit comment by GitHub API: %w", err) } diff --git a/pkg/github/pr.go b/pkg/github/pr.go index 8548543a..a96e67f4 100644 --- a/pkg/github/pr.go +++ b/pkg/github/pr.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - "github.com/google/go-github/v67/github" + "github.com/google/go-github/v68/github" ) func (c *Client) PRNumberWithSHA(ctx context.Context, owner, repo, sha string) (int, error) {