From 799041277f493cde67519f4baf5ee63acf3e419c Mon Sep 17 00:00:00 2001 From: nitrocode <7775707+nitrocode@users.noreply.github.com> Date: Tue, 20 Dec 2022 09:26:46 -0600 Subject: [PATCH] Use go-github v48 --- Makefile | 2 +- go.mod | 2 +- go.sum | 4 ++-- server/controllers/events/events_controller.go | 2 +- server/controllers/events/events_controller_e2e_test.go | 2 +- server/controllers/events/github_request_validator.go | 2 +- server/events/apply_command_runner_test.go | 2 +- server/events/command_runner.go | 2 +- server/events/command_runner_test.go | 2 +- server/events/event_parser.go | 2 +- server/events/event_parser_test.go | 2 +- .../events/mocks/matchers/ptr_to_github_issuecommentevent.go | 2 +- server/events/mocks/matchers/ptr_to_github_pullrequest.go | 2 +- .../events/mocks/matchers/ptr_to_github_pullrequestevent.go | 2 +- server/events/mocks/matchers/ptr_to_github_repository.go | 2 +- server/events/mocks/mock_event_parsing.go | 2 +- server/events/mocks/mock_github_pull_getter.go | 2 +- server/events/vcs/fixtures/fixtures.go | 2 +- server/events/vcs/github_client.go | 2 +- server/events/vcs/github_credentials.go | 2 +- server/events/vcs/instrumented_client.go | 2 +- testdrive/github.go | 2 +- testdrive/testdrive.go | 2 +- 23 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index 2046fa1fc9..b49e594be8 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ test: ## Run tests .PHONY: docker/test docker/test: ## Run tests in docker - docker run -it -v $(pwd):/atlantis ghcr.io/runatlantis/testing-env:2022.12.17 sh -c "cd /atlantis && make test" + docker run -it -v $(PWD):/atlantis ghcr.io/runatlantis/testing-env:2022.12.17 sh -c "cd /atlantis && make test" test-all: ## Run tests including integration @go test $(PKG) diff --git a/go.mod b/go.mod index 33ef92394f..989e24cc35 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/go-redis/redis/v9 v9.0.0-rc.2 github.com/go-test/deep v1.1.0 github.com/golang-jwt/jwt/v4 v4.4.3 - github.com/google/go-github/v31 v31.0.0 + github.com/google/go-github/v48 v48.2.0 github.com/google/uuid v1.3.0 github.com/gorilla/mux v1.8.0 github.com/gorilla/websocket v1.5.0 diff --git a/go.sum b/go.sum index fde9cd361d..cf7e5bed08 100644 --- a/go.sum +++ b/go.sum @@ -203,10 +203,10 @@ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8 github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-github/v31 v31.0.0 h1:JJUxlP9lFK+ziXKimTCprajMApV1ecWD4NB6CCb0plo= -github.com/google/go-github/v31 v31.0.0/go.mod h1:NQPZol8/1sMoWYGN2yaALIBytu17gAWfhbweiEed3pM= github.com/google/go-github/v45 v45.2.0 h1:5oRLszbrkvxDDqBCNj2hjDZMKmvexaZ1xw/FCD+K3FI= github.com/google/go-github/v45 v45.2.0/go.mod h1:FObaZJEDSTa/WGCzZ2Z3eoCDXWJKMenWWTrd8jrta28= +github.com/google/go-github/v48 v48.2.0 h1:68puzySE6WqUY9KWmpOsDEQfDZsso98rT6pZcz9HqcE= +github.com/google/go-github/v48 v48.2.0/go.mod h1:dDlehKBDo850ZPvCTK0sEqTCVWcrGl2LcDiajkYi89Y= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= diff --git a/server/controllers/events/events_controller.go b/server/controllers/events/events_controller.go index 7be7fa49ea..83908a6b55 100644 --- a/server/controllers/events/events_controller.go +++ b/server/controllers/events/events_controller.go @@ -19,7 +19,7 @@ import ( "net/http" "strings" - "github.com/google/go-github/v31/github" + "github.com/google/go-github/v48/github" "github.com/mcdafydd/go-azuredevops/azuredevops" "github.com/microcosm-cc/bluemonday" "github.com/pkg/errors" diff --git a/server/controllers/events/events_controller_e2e_test.go b/server/controllers/events/events_controller_e2e_test.go index 8de9d3c334..45d68de0ce 100644 --- a/server/controllers/events/events_controller_e2e_test.go +++ b/server/controllers/events/events_controller_e2e_test.go @@ -12,7 +12,7 @@ import ( "strings" "testing" - "github.com/google/go-github/v31/github" + "github.com/google/go-github/v48/github" "github.com/hashicorp/go-getter" "github.com/hashicorp/go-version" . "github.com/petergtz/pegomock" diff --git a/server/controllers/events/github_request_validator.go b/server/controllers/events/github_request_validator.go index 9a7ffc19ba..565a774d0f 100644 --- a/server/controllers/events/github_request_validator.go +++ b/server/controllers/events/github_request_validator.go @@ -19,7 +19,7 @@ import ( "io" "net/http" - "github.com/google/go-github/v31/github" + "github.com/google/go-github/v48/github" ) //go:generate pegomock generate -m --use-experimental-model-gen --package mocks -o mocks/mock_github_request_validator.go GithubRequestValidator diff --git a/server/events/apply_command_runner_test.go b/server/events/apply_command_runner_test.go index 567c0d64a6..3a08e7078d 100644 --- a/server/events/apply_command_runner_test.go +++ b/server/events/apply_command_runner_test.go @@ -4,7 +4,7 @@ import ( "errors" "testing" - "github.com/google/go-github/v31/github" + "github.com/google/go-github/v48/github" . "github.com/petergtz/pegomock" "github.com/runatlantis/atlantis/server/core/locking" "github.com/runatlantis/atlantis/server/events" diff --git a/server/events/command_runner.go b/server/events/command_runner.go index 19eb0232a4..e5286e7f3d 100644 --- a/server/events/command_runner.go +++ b/server/events/command_runner.go @@ -17,7 +17,7 @@ import ( "fmt" "strconv" - "github.com/google/go-github/v31/github" + "github.com/google/go-github/v48/github" "github.com/mcdafydd/go-azuredevops/azuredevops" "github.com/pkg/errors" "github.com/runatlantis/atlantis/server/core/config/valid" diff --git a/server/events/command_runner_test.go b/server/events/command_runner_test.go index d3f96b1e7c..bc7ea38fc7 100644 --- a/server/events/command_runner_test.go +++ b/server/events/command_runner_test.go @@ -27,7 +27,7 @@ import ( "github.com/runatlantis/atlantis/server/logging" "github.com/runatlantis/atlantis/server/metrics" - "github.com/google/go-github/v31/github" + "github.com/google/go-github/v48/github" . "github.com/petergtz/pegomock" lockingmocks "github.com/runatlantis/atlantis/server/core/locking/mocks" "github.com/runatlantis/atlantis/server/events" diff --git a/server/events/event_parser.go b/server/events/event_parser.go index 10a8aa8df1..9428bad735 100644 --- a/server/events/event_parser.go +++ b/server/events/event_parser.go @@ -20,7 +20,7 @@ import ( "path" "strings" - "github.com/google/go-github/v31/github" + "github.com/google/go-github/v48/github" "github.com/mcdafydd/go-azuredevops/azuredevops" "github.com/pkg/errors" "github.com/runatlantis/atlantis/server/events/command" diff --git a/server/events/event_parser_test.go b/server/events/event_parser_test.go index 4e7d35ac7b..29c3820fb3 100644 --- a/server/events/event_parser_test.go +++ b/server/events/event_parser_test.go @@ -21,7 +21,7 @@ import ( "strings" "testing" - "github.com/google/go-github/v31/github" + "github.com/google/go-github/v48/github" "github.com/mcdafydd/go-azuredevops/azuredevops" "github.com/mohae/deepcopy" "github.com/runatlantis/atlantis/server/events" diff --git a/server/events/mocks/matchers/ptr_to_github_issuecommentevent.go b/server/events/mocks/matchers/ptr_to_github_issuecommentevent.go index dfc9029af6..c53ba3aca5 100644 --- a/server/events/mocks/matchers/ptr_to_github_issuecommentevent.go +++ b/server/events/mocks/matchers/ptr_to_github_issuecommentevent.go @@ -6,7 +6,7 @@ import ( "github.com/petergtz/pegomock" - github "github.com/google/go-github/v31/github" + github "github.com/google/go-github/v48/github" ) func AnyPtrToGithubIssueCommentEvent() *github.IssueCommentEvent { diff --git a/server/events/mocks/matchers/ptr_to_github_pullrequest.go b/server/events/mocks/matchers/ptr_to_github_pullrequest.go index 0ac17c2a2c..8bd1c49c11 100644 --- a/server/events/mocks/matchers/ptr_to_github_pullrequest.go +++ b/server/events/mocks/matchers/ptr_to_github_pullrequest.go @@ -6,7 +6,7 @@ import ( "github.com/petergtz/pegomock" - github "github.com/google/go-github/v31/github" + github "github.com/google/go-github/v48/github" ) func AnyPtrToGithubPullRequest() *github.PullRequest { diff --git a/server/events/mocks/matchers/ptr_to_github_pullrequestevent.go b/server/events/mocks/matchers/ptr_to_github_pullrequestevent.go index 9bf4f7947e..a32ecd4e3b 100644 --- a/server/events/mocks/matchers/ptr_to_github_pullrequestevent.go +++ b/server/events/mocks/matchers/ptr_to_github_pullrequestevent.go @@ -6,7 +6,7 @@ import ( "github.com/petergtz/pegomock" - github "github.com/google/go-github/v31/github" + github "github.com/google/go-github/v48/github" ) func AnyPtrToGithubPullRequestEvent() *github.PullRequestEvent { diff --git a/server/events/mocks/matchers/ptr_to_github_repository.go b/server/events/mocks/matchers/ptr_to_github_repository.go index 34a0529af8..ebc41a33ea 100644 --- a/server/events/mocks/matchers/ptr_to_github_repository.go +++ b/server/events/mocks/matchers/ptr_to_github_repository.go @@ -6,7 +6,7 @@ import ( "github.com/petergtz/pegomock" - github "github.com/google/go-github/v31/github" + github "github.com/google/go-github/v48/github" ) func AnyPtrToGithubRepository() *github.Repository { diff --git a/server/events/mocks/mock_event_parsing.go b/server/events/mocks/mock_event_parsing.go index 54e8e6215a..9ab83204d0 100644 --- a/server/events/mocks/mock_event_parsing.go +++ b/server/events/mocks/mock_event_parsing.go @@ -4,7 +4,7 @@ package mocks import ( - github "github.com/google/go-github/v31/github" + github "github.com/google/go-github/v48/github" azuredevops "github.com/mcdafydd/go-azuredevops/azuredevops" pegomock "github.com/petergtz/pegomock" models "github.com/runatlantis/atlantis/server/events/models" diff --git a/server/events/mocks/mock_github_pull_getter.go b/server/events/mocks/mock_github_pull_getter.go index 357e727b97..63c516513b 100644 --- a/server/events/mocks/mock_github_pull_getter.go +++ b/server/events/mocks/mock_github_pull_getter.go @@ -7,7 +7,7 @@ import ( "reflect" "time" - github "github.com/google/go-github/v31/github" + github "github.com/google/go-github/v48/github" pegomock "github.com/petergtz/pegomock" models "github.com/runatlantis/atlantis/server/events/models" ) diff --git a/server/events/vcs/fixtures/fixtures.go b/server/events/vcs/fixtures/fixtures.go index a6e9d2b20b..7789e9dc40 100644 --- a/server/events/vcs/fixtures/fixtures.go +++ b/server/events/vcs/fixtures/fixtures.go @@ -22,7 +22,7 @@ import ( "testing" "github.com/golang-jwt/jwt/v4" - "github.com/google/go-github/v31/github" + "github.com/google/go-github/v48/github" "github.com/mcdafydd/go-azuredevops/azuredevops" ) diff --git a/server/events/vcs/github_client.go b/server/events/vcs/github_client.go index dc6e8eca58..1d3e8d8425 100644 --- a/server/events/vcs/github_client.go +++ b/server/events/vcs/github_client.go @@ -21,7 +21,7 @@ import ( "strings" "time" - "github.com/google/go-github/v31/github" + "github.com/google/go-github/v48/github" "github.com/pkg/errors" "github.com/runatlantis/atlantis/server/events/command" "github.com/runatlantis/atlantis/server/events/models" diff --git a/server/events/vcs/github_credentials.go b/server/events/vcs/github_credentials.go index ef64cbce7b..795e9f0db8 100644 --- a/server/events/vcs/github_credentials.go +++ b/server/events/vcs/github_credentials.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/bradleyfalzon/ghinstallation/v2" - "github.com/google/go-github/v31/github" + "github.com/google/go-github/v48/github" "github.com/pkg/errors" ) diff --git a/server/events/vcs/instrumented_client.go b/server/events/vcs/instrumented_client.go index 6e8c4e6d60..53df8ee7ea 100644 --- a/server/events/vcs/instrumented_client.go +++ b/server/events/vcs/instrumented_client.go @@ -4,7 +4,7 @@ import ( "fmt" "strconv" - "github.com/google/go-github/v31/github" + "github.com/google/go-github/v48/github" "github.com/runatlantis/atlantis/server/events/models" "github.com/runatlantis/atlantis/server/logging" "github.com/runatlantis/atlantis/server/metrics" diff --git a/testdrive/github.go b/testdrive/github.go index ef95c742b8..23451e2ed2 100644 --- a/testdrive/github.go +++ b/testdrive/github.go @@ -18,7 +18,7 @@ import ( "strings" "time" - "github.com/google/go-github/v31/github" + "github.com/google/go-github/v48/github" ) var githubUsername string diff --git a/testdrive/testdrive.go b/testdrive/testdrive.go index 5c5a87f06b..c3e4258a3c 100644 --- a/testdrive/testdrive.go +++ b/testdrive/testdrive.go @@ -31,7 +31,7 @@ import ( "time" "github.com/briandowns/spinner" - "github.com/google/go-github/v31/github" + "github.com/google/go-github/v48/github" "github.com/mitchellh/colorstring" "github.com/pkg/errors" )