Skip to content

Commit

Permalink
fix(deps): update module github.com/google/go-github/v67 to v68 (#1695)
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

---------

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 6877730 commit ec2844b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 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.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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion pkg/github/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
10 changes: 5 additions & 5 deletions pkg/github/comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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)
}
Expand All @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/github/pr.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"
)

func (c *Client) PRNumberWithSHA(ctx context.Context, owner, repo, sha string) (int, error) {
Expand Down

0 comments on commit ec2844b

Please sign in to comment.