Use go-github v48 (#2839)

This commit is contained in:
nitrocode
2022-12-20 10:38:21 -06:00
committed by GitHub
parent 3086788cd5
commit b94575ac88
23 changed files with 24 additions and 24 deletions

View File

@@ -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)

2
go.mod
View File

@@ -14,7 +14,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/shlex v0.0.0-20191202100458-e7afc7fbc510
github.com/google/uuid v1.3.0
github.com/gorilla/mux v1.8.0

4
go.sum
View File

@@ -201,10 +201,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=

View File

@@ -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"

View File

@@ -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"

View File

@@ -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

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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"

View File

@@ -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"
)

View File

@@ -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"
)

View File

@@ -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"

View File

@@ -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"
)

View File

@@ -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"

View File

@@ -18,7 +18,7 @@ import (
"strings"
"time"
"github.com/google/go-github/v31/github"
"github.com/google/go-github/v48/github"
)
var githubUsername string

View File

@@ -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"
)