Skip to content

Commit

Permalink
chore(deps): upgrade go-github 63.x (#4943)
Browse files Browse the repository at this point in the history
Signed-off-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
nitrocode and renovate[bot] committed Sep 23, 2024
1 parent 10e8f3f commit 1c1c505
Show file tree
Hide file tree
Showing 24 changed files with 38 additions and 34 deletions.
12 changes: 7 additions & 5 deletions e2e/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"os/exec"
"strings"

"github.com/google/go-github/v59/github"
"github.com/google/go-github/v63/github"
)

type GithubClient struct {
Expand Down Expand Up @@ -81,13 +81,15 @@ func (g GithubClient) Clone(cloneDir string) error {
}

func (g GithubClient) CreateAtlantisWebhook(ctx context.Context, hookURL string) (int64, error) {
contentType := "json"
hookConfig := &github.HookConfig{
ContentType: &contentType,
URL: &hookURL,
}
// create atlantis hook
atlantisHook := &github.Hook{
Events: []string{"issue_comment", "pull_request", "push"},
Config: map[string]interface{}{
"url": hookURL,
"content_type": "json",
},
Config: hookConfig,
Active: github.Bool(true),
}

Expand Down
2 changes: 1 addition & 1 deletion e2e/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/runatlantis/atlantis/e2e
go 1.23.0

require (
github.com/google/go-github/v59 v59.0.0
github.com/google/go-github/v63 v63.0.0
github.com/hashicorp/go-multierror v1.1.1
github.com/xanzy/go-gitlab v0.109.0
)
Expand Down
4 changes: 2 additions & 2 deletions e2e/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.5/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/v59 v59.0.0 h1:7h6bgpF5as0YQLLkEiVqpgtJqjimMYhBkD4jT5aN3VA=
github.com/google/go-github/v59 v59.0.0/go.mod h1:rJU4R0rQHFVFDOkqGWxfLNo6vEk4dv40oDjhV/gH6wM=
github.com/google/go-github/v63 v63.0.0 h1:13xwK/wk9alSokujB9lJkuzdmQuVn2QCPeck76wR3nE=
github.com/google/go-github/v63 v63.0.0/go.mod h1:IqbcrgUmIcEaioWrGYei/09o+ge5vhffGOcxrO0AfmA=
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/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require (
github.com/go-playground/validator/v10 v10.22.1
github.com/go-test/deep v1.1.1
github.com/golang-jwt/jwt/v5 v5.2.1
github.com/google/go-github/v59 v59.0.0
github.com/google/go-github/v63 v63.0.0
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
github.com/google/uuid v1.6.0
github.com/gorilla/mux v1.8.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
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/v59 v59.0.0 h1:7h6bgpF5as0YQLLkEiVqpgtJqjimMYhBkD4jT5aN3VA=
github.com/google/go-github/v59 v59.0.0/go.mod h1:rJU4R0rQHFVFDOkqGWxfLNo6vEk4dv40oDjhV/gH6wM=
github.com/google/go-github/v62 v62.0.0 h1:/6mGCaRywZz9MuHyw9gD1CwsbmBX8GWsbFkwMmHdhl4=
github.com/google/go-github/v62 v62.0.0/go.mod h1:EMxeUqGJq2xRu9DYBMwel/mr7kZrzUOfQmmpYrZn2a4=
github.com/google/go-github/v63 v63.0.0 h1:13xwK/wk9alSokujB9lJkuzdmQuVn2QCPeck76wR3nE=
github.com/google/go-github/v63 v63.0.0/go.mod h1:IqbcrgUmIcEaioWrGYei/09o+ge5vhffGOcxrO0AfmA=
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=
Expand Down
2 changes: 1 addition & 1 deletion server/controllers/events/events_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"net/http"
"strings"

"github.com/google/go-github/v59/github"
"github.com/google/go-github/v63/github"
"github.com/mcdafydd/go-azuredevops/azuredevops"
"github.com/microcosm-cc/bluemonday"
"github.com/pkg/errors"
Expand Down
2 changes: 1 addition & 1 deletion server/controllers/events/events_controller_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"strings"
"testing"

"github.com/google/go-github/v59/github"
"github.com/google/go-github/v63/github"
"github.com/hashicorp/go-version"
. "github.com/petergtz/pegomock/v4"

Expand Down
2 changes: 1 addition & 1 deletion server/controllers/events/events_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"strings"
"testing"

"github.com/google/go-github/v59/github"
"github.com/google/go-github/v63/github"
"github.com/mcdafydd/go-azuredevops/azuredevops"
. "github.com/petergtz/pegomock/v4"
events_controllers "github.com/runatlantis/atlantis/server/controllers/events"
Expand Down
2 changes: 1 addition & 1 deletion server/controllers/events/github_request_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"io"
"net/http"

"github.com/google/go-github/v59/github"
"github.com/google/go-github/v63/github"
)

//go:generate pegomock generate --package mocks -o mocks/mock_github_request_validator.go GithubRequestValidator
Expand Down
2 changes: 1 addition & 1 deletion server/events/apply_command_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"testing"

"github.com/google/go-github/v59/github"
"github.com/google/go-github/v63/github"
. "github.com/petergtz/pegomock/v4"
"github.com/runatlantis/atlantis/server/core/db"
"github.com/runatlantis/atlantis/server/core/locking"
Expand Down
2 changes: 1 addition & 1 deletion server/events/command_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"fmt"
"strconv"

"github.com/google/go-github/v59/github"
"github.com/google/go-github/v63/github"
"github.com/mcdafydd/go-azuredevops/azuredevops"
"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/core/config/valid"
Expand Down
2 changes: 1 addition & 1 deletion server/events/command_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/runatlantis/atlantis/server/logging"
"github.com/runatlantis/atlantis/server/metrics"

"github.com/google/go-github/v59/github"
"github.com/google/go-github/v63/github"
. "github.com/petergtz/pegomock/v4"
lockingmocks "github.com/runatlantis/atlantis/server/core/locking/mocks"
"github.com/runatlantis/atlantis/server/events"
Expand Down
2 changes: 1 addition & 1 deletion server/events/event_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
giteasdk "code.gitea.io/sdk/gitea"

"github.com/go-playground/validator/v10"
"github.com/google/go-github/v59/github"
"github.com/google/go-github/v63/github"
lru "github.com/hashicorp/golang-lru/v2"
"github.com/mcdafydd/go-azuredevops/azuredevops"
"github.com/pkg/errors"
Expand Down
2 changes: 1 addition & 1 deletion server/events/event_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"strings"
"testing"

"github.com/google/go-github/v59/github"
"github.com/google/go-github/v63/github"
"github.com/mcdafydd/go-azuredevops/azuredevops"
"github.com/mohae/deepcopy"
"github.com/runatlantis/atlantis/server/events"
Expand Down
2 changes: 1 addition & 1 deletion server/events/mocks/mock_event_parsing.go

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

2 changes: 1 addition & 1 deletion server/events/mocks/mock_github_pull_getter.go

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

2 changes: 1 addition & 1 deletion server/events/plan_command_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"testing"

"github.com/google/go-github/v59/github"
"github.com/google/go-github/v63/github"
. "github.com/petergtz/pegomock/v4"
"github.com/runatlantis/atlantis/server/core/db"
"github.com/runatlantis/atlantis/server/events"
Expand Down
2 changes: 1 addition & 1 deletion server/events/vcs/github_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"strings"
"time"

"github.com/google/go-github/v59/github"
"github.com/google/go-github/v63/github"
"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/events/command"
"github.com/runatlantis/atlantis/server/events/models"
Expand Down
2 changes: 1 addition & 1 deletion server/events/vcs/github_credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"

"github.com/bradleyfalzon/ghinstallation/v2"
"github.com/google/go-github/v59/github"
"github.com/google/go-github/v63/github"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion server/events/vcs/instrumented_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package vcs
import (
"strconv"

"github.com/google/go-github/v59/github"
"github.com/google/go-github/v63/github"
"github.com/runatlantis/atlantis/server/events/models"
"github.com/runatlantis/atlantis/server/logging"
"github.com/runatlantis/atlantis/server/metrics"
Expand Down
2 changes: 1 addition & 1 deletion server/events/vcs/mocks/mock_github_pull_request_getter.go

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

2 changes: 1 addition & 1 deletion server/events/vcs/testdata/fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"testing"

"github.com/golang-jwt/jwt/v5"
"github.com/google/go-github/v59/github"
"github.com/google/go-github/v63/github"
"github.com/mcdafydd/go-azuredevops/azuredevops"
)

Expand Down
12 changes: 7 additions & 5 deletions testdrive/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"strings"
"time"

"github.com/google/go-github/v59/github"
"github.com/google/go-github/v63/github"
)

var githubUsername string
Expand Down Expand Up @@ -55,12 +55,14 @@ func (g *Client) CheckForkSuccess(ownerName string, forkRepoName string) bool {

// CreateWebhook creates a GitHub webhook to send requests to our local ngrok.
func (g *Client) CreateWebhook(ownerName string, repoName string, hookURL string) error {
contentType := "json"
hookConfig := &github.HookConfig{
ContentType: &contentType,
URL: &hookURL,
}
atlantisHook := &github.Hook{
Events: []string{"issue_comment", "pull_request", "pull_request_review", "push"},
Config: map[string]interface{}{
"url": hookURL,
"content_type": "json",
},
Config: hookConfig,
Active: github.Bool(true),
}
_, _, err := g.client.Repositories.CreateHook(g.ctx, ownerName, repoName, atlantisHook)
Expand Down
2 changes: 1 addition & 1 deletion testdrive/testdrive.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"time"

"github.com/briandowns/spinner"
"github.com/google/go-github/v59/github"
"github.com/google/go-github/v63/github"
"github.com/mitchellh/colorstring"
"github.com/pkg/errors"
)
Expand Down

0 comments on commit 1c1c505

Please sign in to comment.