Skip to content

Commit d473fe0

Browse files
fix(deps): update module github.com/google/go-github/v66 to v68 in go.mod (main) (#5209)
Signed-off-by: Rui Chen <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Rui Chen <[email protected]>
1 parent d2c5476 commit d473fe0

24 files changed

+96
-93
lines changed

e2e/github.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"os/exec"
2222
"strings"
2323

24-
"github.com/google/go-github/v66/github"
24+
"github.com/google/go-github/v68/github"
2525
)
2626

2727
type GithubClient struct {
@@ -90,7 +90,7 @@ func (g GithubClient) CreateAtlantisWebhook(ctx context.Context, hookURL string)
9090
atlantisHook := &github.Hook{
9191
Events: []string{"issue_comment", "pull_request", "push"},
9292
Config: hookConfig,
93-
Active: github.Bool(true),
93+
Active: github.Ptr(true),
9494
}
9595

9696
hook, _, err := g.client.Repositories.CreateHook(ctx, g.ownerName, g.repoName, atlantisHook)
@@ -146,7 +146,7 @@ func (g GithubClient) GetAtlantisStatus(ctx context.Context, branchName string)
146146

147147
func (g GithubClient) ClosePullRequest(ctx context.Context, pullRequestNumber int) error {
148148
// clean up
149-
_, _, err := g.client.PullRequests.Edit(ctx, g.ownerName, g.repoName, pullRequestNumber, &github.PullRequest{State: github.String("closed")})
149+
_, _, err := g.client.PullRequests.Edit(ctx, g.ownerName, g.repoName, pullRequestNumber, &github.PullRequest{State: github.Ptr("closed")})
150150
if err != nil {
151151
return fmt.Errorf("error while closing new pull request: %v", err)
152152
}

e2e/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/runatlantis/atlantis/e2e
33
go 1.23.4
44

55
require (
6-
github.com/google/go-github/v66 v66.0.0
6+
github.com/google/go-github/v68 v68.0.0
77
github.com/hashicorp/go-multierror v1.1.1
88
gitlab.com/gitlab-org/api/client-go v0.118.0
99
)

e2e/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
1010
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
1111
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
1212
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
13-
github.com/google/go-github/v66 v66.0.0 h1:ADJsaXj9UotwdgK8/iFZtv7MLc8E8WBl62WLd/D/9+M=
14-
github.com/google/go-github/v66 v66.0.0/go.mod h1:+4SO9Zkuyf8ytMj0csN1NR/5OTR+MfqPp8P8dVlcvY4=
13+
github.com/google/go-github/v68 v68.0.0 h1:ZW57zeNZiXTdQ16qrDiZ0k6XucrxZ2CGmoTvcCyQG6s=
14+
github.com/google/go-github/v68 v68.0.0/go.mod h1:K9HAUBovM2sLwM408A18h+wd9vqdLOEqTUCbnRIcx68=
1515
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
1616
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
1717
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=

go.mod

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ require (
1313
github.com/go-playground/validator/v10 v10.23.0
1414
github.com/go-test/deep v1.1.1
1515
github.com/golang-jwt/jwt/v5 v5.2.1
16-
github.com/google/go-github/v66 v66.0.0
16+
github.com/google/go-github/v68 v68.0.0
1717
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
1818
github.com/google/uuid v1.6.0
1919
github.com/gorilla/mux v1.8.1
@@ -144,3 +144,6 @@ require (
144144
google.golang.org/protobuf v1.36.0 // indirect
145145
gopkg.in/ini.v1 v1.67.0 // indirect
146146
)
147+
148+
// upstream pr to patch go-github to use v68, https://github.com/bradleyfalzon/ghinstallation/pull/137
149+
replace github.com/bradleyfalzon/ghinstallation/v2 => github.com/chenrui333/ghinstallation/v2 v2.12.1-0.20241231170237-36dcfb064b2f

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
7575
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
7676
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas=
7777
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4=
78-
github.com/bradleyfalzon/ghinstallation/v2 v2.12.0 h1:k8oVjGhZel2qmCUsYwSE34jPNT9DL2wCBOtugsHv26g=
79-
github.com/bradleyfalzon/ghinstallation/v2 v2.12.0/go.mod h1:V4gJcNyAftH0rXpRp1SUVUuh+ACxOH1xOk/ZzkRHltg=
8078
github.com/briandowns/spinner v1.23.1 h1:t5fDPmScwUjozhDj4FA46p5acZWIPXYE30qW2Ptu650=
8179
github.com/briandowns/spinner v1.23.1/go.mod h1:LaZeM4wm2Ywy6vO571mvhQNRcWfRUnXOs0RcKV0wYKM=
8280
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
@@ -92,6 +90,8 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL
9290
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
9391
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
9492
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
93+
github.com/chenrui333/ghinstallation/v2 v2.12.1-0.20241231170237-36dcfb064b2f h1:TN3fEfE18MJ+o3Y4PMUWu1S9IVYL7a82G3LVa8zJ7/c=
94+
github.com/chenrui333/ghinstallation/v2 v2.12.1-0.20241231170237-36dcfb064b2f/go.mod h1:EJ6fgedVEHa2kUyBTTvslJCXJafS/mhJNNKEOCspZXQ=
9595
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
9696
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
9797
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
@@ -216,8 +216,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
216216
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
217217
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
218218
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
219-
github.com/google/go-github/v66 v66.0.0 h1:ADJsaXj9UotwdgK8/iFZtv7MLc8E8WBl62WLd/D/9+M=
220-
github.com/google/go-github/v66 v66.0.0/go.mod h1:+4SO9Zkuyf8ytMj0csN1NR/5OTR+MfqPp8P8dVlcvY4=
219+
github.com/google/go-github/v68 v68.0.0 h1:ZW57zeNZiXTdQ16qrDiZ0k6XucrxZ2CGmoTvcCyQG6s=
220+
github.com/google/go-github/v68 v68.0.0/go.mod h1:K9HAUBovM2sLwM408A18h+wd9vqdLOEqTUCbnRIcx68=
221221
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
222222
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
223223
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=

server/controllers/events/events_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"strconv"
2323
"strings"
2424

25-
"github.com/google/go-github/v66/github"
25+
"github.com/google/go-github/v68/github"
2626
"github.com/mcdafydd/go-azuredevops/azuredevops"
2727
"github.com/microcosm-cc/bluemonday"
2828
"github.com/pkg/errors"

server/controllers/events/events_controller_e2e_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"strings"
1414
"testing"
1515

16-
"github.com/google/go-github/v66/github"
16+
"github.com/google/go-github/v68/github"
1717
"github.com/hashicorp/go-version"
1818
. "github.com/petergtz/pegomock/v4"
1919

@@ -1695,26 +1695,26 @@ func GitHubPullRequestParsed(headSHA string) *github.PullRequest {
16951695
headSHA = "13940d121be73f656e2132c6d7b4c8e87878ac8d"
16961696
}
16971697
return &github.PullRequest{
1698-
Number: github.Int(2),
1699-
State: github.String("open"),
1700-
HTMLURL: github.String("htmlurl"),
1698+
Number: github.Ptr(2),
1699+
State: github.Ptr("open"),
1700+
HTMLURL: github.Ptr("htmlurl"),
17011701
Head: &github.PullRequestBranch{
17021702
Repo: &github.Repository{
1703-
FullName: github.String("runatlantis/atlantis-tests"),
1704-
CloneURL: github.String("https://github.com/runatlantis/atlantis-tests.git"),
1703+
FullName: github.Ptr("runatlantis/atlantis-tests"),
1704+
CloneURL: github.Ptr("https://github.com/runatlantis/atlantis-tests.git"),
17051705
},
1706-
SHA: github.String(headSHA),
1707-
Ref: github.String("branch"),
1706+
SHA: github.Ptr(headSHA),
1707+
Ref: github.Ptr("branch"),
17081708
},
17091709
Base: &github.PullRequestBranch{
17101710
Repo: &github.Repository{
1711-
FullName: github.String("runatlantis/atlantis-tests"),
1712-
CloneURL: github.String("https://github.com/runatlantis/atlantis-tests.git"),
1711+
FullName: github.Ptr("runatlantis/atlantis-tests"),
1712+
CloneURL: github.Ptr("https://github.com/runatlantis/atlantis-tests.git"),
17131713
},
1714-
Ref: github.String("main"),
1714+
Ref: github.Ptr("main"),
17151715
},
17161716
User: &github.User{
1717-
Login: github.String("atlantisbot"),
1717+
Login: github.Ptr("atlantisbot"),
17181718
},
17191719
}
17201720
}

server/controllers/events/events_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"strings"
2626
"testing"
2727

28-
"github.com/google/go-github/v66/github"
28+
"github.com/google/go-github/v68/github"
2929
"github.com/mcdafydd/go-azuredevops/azuredevops"
3030
. "github.com/petergtz/pegomock/v4"
3131
events_controllers "github.com/runatlantis/atlantis/server/controllers/events"

server/controllers/events/github_request_validator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"io"
2020
"net/http"
2121

22-
"github.com/google/go-github/v66/github"
22+
"github.com/google/go-github/v68/github"
2323
)
2424

2525
//go:generate pegomock generate --package mocks -o mocks/mock_github_request_validator.go GithubRequestValidator

server/events/apply_command_runner_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"errors"
55
"testing"
66

7-
"github.com/google/go-github/v66/github"
7+
"github.com/google/go-github/v68/github"
88
. "github.com/petergtz/pegomock/v4"
99
"github.com/runatlantis/atlantis/server/core/db"
1010
"github.com/runatlantis/atlantis/server/core/locking"
@@ -54,7 +54,7 @@ func TestApplyCommandRunner_IsLocked(t *testing.T) {
5454
scopeNull, _, _ := metrics.NewLoggingScope(logger, "atlantis")
5555

5656
pull := &github.PullRequest{
57-
State: github.String("open"),
57+
State: github.Ptr("open"),
5858
}
5959
modelPull := models.PullRequest{BaseRepo: testdata.GithubRepo, State: models.OpenPullState, Num: testdata.Pull.Num}
6060
When(githubGetter.GetPullRequest(logger, testdata.GithubRepo, testdata.Pull.Num)).ThenReturn(pull, nil)
@@ -475,7 +475,7 @@ func TestApplyCommandRunner_ExecutionOrder(t *testing.T) {
475475
scopeNull, _, _ := metrics.NewLoggingScope(logger, "atlantis")
476476

477477
pull := &github.PullRequest{
478-
State: github.String("open"),
478+
State: github.Ptr("open"),
479479
}
480480
modelPull := models.PullRequest{BaseRepo: testdata.GithubRepo, State: models.OpenPullState, Num: testdata.Pull.Num}
481481

0 commit comments

Comments
 (0)