Skip to content

Commit

Permalink
fix(deps): update module github.com/google/go-github/v67 to v68 (#201)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Robert Kaussow <[email protected]>
  • Loading branch information
renovate[bot] and xoxys authored Jan 13, 2025
1 parent 3a74638 commit 2ac81dd
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion github/api.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"
)

// APIClient is an interface that wraps the GitHub API client.
Expand Down
2 changes: 1 addition & 1 deletion github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/url"
"strings"

"github.com/google/go-github/v67/github"
"github.com/google/go-github/v68/github"
"golang.org/x/oauth2"
)

Expand Down
28 changes: 14 additions & 14 deletions github/github_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"testing"

"github.com/google/go-github/v67/github"
"github.com/google/go-github/v68/github"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/thegeeklab/wp-github-comment/github/mocks"
Expand Down Expand Up @@ -39,10 +39,10 @@ func TestGithubIssue_FindComment(t *testing.T) {
Repo: "test-repo",
},
comments: []*github.IssueComment{
{Body: github.String("<!-- id: test-key -->\ntest comment\n")},
{Body: github.Ptr("<!-- id: test-key -->\ntest comment\n")},
},
want: &github.IssueComment{
Body: github.String("<!-- id: test-key -->\ntest comment\n"),
Body: github.Ptr("<!-- id: test-key -->\ntest comment\n"),
},
},
{
Expand All @@ -53,7 +53,7 @@ func TestGithubIssue_FindComment(t *testing.T) {
Repo: "test-repo",
},
comments: []*github.IssueComment{
{Body: github.String("other comment")},
{Body: github.Ptr("other comment")},
},
wantErr: ErrCommentNotFound,
},
Expand All @@ -65,11 +65,11 @@ func TestGithubIssue_FindComment(t *testing.T) {
Repo: "test-repo",
},
comments: []*github.IssueComment{
{Body: github.String("other comment")},
{Body: github.String("<!-- id: test-key -->\ntest comment\n")},
{Body: github.String("another comment")},
{Body: github.Ptr("other comment")},
{Body: github.Ptr("<!-- id: test-key -->\ntest comment\n")},
{Body: github.Ptr("another comment")},
},
want: &github.IssueComment{Body: github.String("<!-- id: test-key -->\ntest comment\n")},
want: &github.IssueComment{Body: github.Ptr("<!-- id: test-key -->\ntest comment\n")},
},
}

Expand Down Expand Up @@ -117,7 +117,7 @@ func TestGithubIssue_AddComment(t *testing.T) {
Update: false,
},
want: &github.IssueComment{
Body: github.String("<!-- id: test-key -->\ntest message\n"),
Body: github.Ptr("<!-- id: test-key -->\ntest message\n"),
},
},
{
Expand All @@ -130,10 +130,10 @@ func TestGithubIssue_AddComment(t *testing.T) {
Update: true,
},
comments: []*github.IssueComment{
{ID: github.Int64(123), Body: github.String("<!-- id: test-key -->\ntest message\n")},
{ID: github.Ptr(int64(123)), Body: github.Ptr("<!-- id: test-key -->\ntest message\n")},
},
want: &github.IssueComment{
Body: github.String("<!-- id: test-key -->\ntest message\n"),
Body: github.Ptr("<!-- id: test-key -->\ntest message\n"),
},
},
{
Expand All @@ -146,7 +146,7 @@ func TestGithubIssue_AddComment(t *testing.T) {
Update: true,
},
want: &github.IssueComment{
Body: github.String("<!-- id: test-key -->\ntest message\n"),
Body: github.Ptr("<!-- id: test-key -->\ntest message\n"),
},
},
{
Expand Down Expand Up @@ -180,15 +180,15 @@ func TestGithubIssue_AddComment(t *testing.T) {
mockClient.
On("EditComment", mock.Anything, tt.issueOpt.Owner, tt.issueOpt.Repo, mock.Anything, mock.Anything).
Return(&github.IssueComment{
Body: github.String(fmt.Sprintf("<!-- id: %s -->\n%s\n", tt.issueOpt.Key, tt.issueOpt.Message)),
Body: github.Ptr(fmt.Sprintf("<!-- id: %s -->\n%s\n", tt.issueOpt.Key, tt.issueOpt.Message)),
}, nil, nil)
}

if tt.comments == nil {
var comment *github.IssueComment
if tt.wantErr == nil {
comment = &github.IssueComment{
Body: github.String(fmt.Sprintf("<!-- id: %s -->\n%s\n", tt.issueOpt.Key, tt.issueOpt.Message)),
Body: github.Ptr(fmt.Sprintf("<!-- id: %s -->\n%s\n", tt.issueOpt.Key, tt.issueOpt.Message)),
}
}

Expand Down
2 changes: 1 addition & 1 deletion github/mocks/mock_IssueService.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/thegeeklab/wp-github-comment
go 1.23.4

require (
github.com/google/go-github/v67 v67.0.0
github.com/google/go-github/v68 v68.0.0
github.com/rs/zerolog v1.33.0
github.com/stretchr/testify v1.10.0
github.com/thegeeklab/wp-plugin-go/v4 v4.0.4
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x
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

0 comments on commit 2ac81dd

Please sign in to comment.