Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬆️ upgrade google/go-github to v69 #5037

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion providers/github/connection/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"github.com/bradleyfalzon/ghinstallation/v2"
"github.com/cockroachdb/errors"
"github.com/google/go-github/v67/github"
"github.com/google/go-github/v69/github"
"github.com/hashicorp/go-retryablehttp"
"github.com/mitchellh/hashstructure/v2"
"github.com/rs/zerolog"
Expand Down
38 changes: 21 additions & 17 deletions providers/github/connection/connection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"os"
"testing"

"github.com/google/go-github/v67/github"
"github.com/google/go-github/v69/github"
"github.com/stretchr/testify/require"
"go.mondoo.com/cnquery/v11/providers-sdk/v1/inventory"
"go.mondoo.com/cnquery/v11/providers-sdk/v1/vault"
Expand All @@ -36,31 +36,35 @@ func TestGithubValidConnection_Private_Key(t *testing.T) {
pemData := pem.EncodeToMemory(privateKeyPEM)

_, err = NewGithubConnection(0, &inventory.Asset{
Connections: []*inventory.Config{{
Options: map[string]string{
OPTION_APP_ID: "123",
OPTION_APP_INSTALLATION_ID: "890",
Connections: []*inventory.Config{
{
Options: map[string]string{
OPTION_APP_ID: "123",
OPTION_APP_INSTALLATION_ID: "890",
},
Credentials: []*vault.Credential{
{
Type: vault.CredentialType_private_key,
Secret: pemData,
},
},
},
Credentials: []*vault.Credential{{
Type: vault.CredentialType_private_key,
Secret: pemData,
},
},
},
},
})
require.NoError(t, err)
}

func TestGithubValidConnection_Password(t *testing.T) {
_, err := NewGithubConnection(0, &inventory.Asset{
Connections: []*inventory.Config{{
Credentials: []*vault.Credential{{
Type: vault.CredentialType_password,
Secret: []byte("super_secret"),
Connections: []*inventory.Config{
{
Credentials: []*vault.Credential{
{
Type: vault.CredentialType_password,
Secret: []byte("super_secret"),
},
},
},
},
},
},
})
require.NoError(t, err)
Expand Down
2 changes: 1 addition & 1 deletion providers/github/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/bradleyfalzon/ghinstallation/v2 v2.13.0
github.com/cockroachdb/errors v1.11.3
github.com/gobwas/glob v0.2.3
github.com/google/go-github/v67 v67.0.0
github.com/google/go-github/v69 v69.0.0
github.com/hashicorp/go-retryablehttp v0.7.7
github.com/mitchellh/hashstructure/v2 v2.0.2
github.com/rs/zerolog v1.33.0
Expand Down
4 changes: 2 additions & 2 deletions providers/github/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,10 @@ 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-containerregistry v0.20.3 h1:oNx7IdTI936V8CQRveCjaxOiegWwvM7kqkbXTpyiovI=
github.com/google/go-containerregistry v0.20.3/go.mod h1:w00pIgBRDVUDFM6bq+Qx8lwNWK+cxgCuX1vd3PIBDNI=
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-github/v69 v69.0.0 h1:YnFvZ3pEIZF8KHmI8xyQQe3mYACdkhnaTV2hr7CP2/w=
github.com/google/go-github/v69 v69.0.0/go.mod h1:xne4jymxLR6Uj9b7J7PyTpkMYstEMMwGZa0Aehh1azM=
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/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
Expand Down
2 changes: 1 addition & 1 deletion providers/github/resources/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"github.com/gobwas/glob"
"github.com/google/go-github/v67/github"
"github.com/google/go-github/v69/github"
"github.com/rs/zerolog/log"
"go.mondoo.com/cnquery/v11/llx"
"go.mondoo.com/cnquery/v11/logger"
Expand Down
2 changes: 1 addition & 1 deletion providers/github/resources/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package resources

import (
"github.com/google/go-github/v67/github"
"github.com/google/go-github/v69/github"
"go.mondoo.com/cnquery/v11/llx"
"go.mondoo.com/cnquery/v11/providers-sdk/v1/plugin"
)
Expand Down
2 changes: 1 addition & 1 deletion providers/github/resources/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"context"
"time"

"github.com/google/go-github/v67/github"
"github.com/google/go-github/v69/github"
"github.com/rs/zerolog/log"
"go.mondoo.com/cnquery/v11/llx"
"go.mondoo.com/cnquery/v11/providers-sdk/v1/plugin"
Expand Down
2 changes: 1 addition & 1 deletion providers/github/resources/github_org.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"time"

"github.com/cockroachdb/errors"
"github.com/google/go-github/v67/github"
"github.com/google/go-github/v69/github"
"github.com/rs/zerolog/log"
"go.mondoo.com/cnquery/v11/internal/workerpool"
"go.mondoo.com/cnquery/v11/llx"
Expand Down
2 changes: 1 addition & 1 deletion providers/github/resources/github_package.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strconv"
"strings"

"github.com/google/go-github/v67/github"
"github.com/google/go-github/v69/github"
"go.mondoo.com/cnquery/v11/llx"
"go.mondoo.com/cnquery/v11/providers-sdk/v1/plugin"
"go.mondoo.com/cnquery/v11/providers-sdk/v1/util/convert"
Expand Down
2 changes: 1 addition & 1 deletion providers/github/resources/github_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"sync"
"time"

"github.com/google/go-github/v67/github"
"github.com/google/go-github/v69/github"
"github.com/rs/zerolog/log"
"go.mondoo.com/cnquery/v11/llx"
"go.mondoo.com/cnquery/v11/logger"
Expand Down
2 changes: 1 addition & 1 deletion providers/github/resources/github_team.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strconv"
"strings"

"github.com/google/go-github/v67/github"
"github.com/google/go-github/v69/github"
"go.mondoo.com/cnquery/v11/llx"
"go.mondoo.com/cnquery/v11/providers/github/connection"
)
Expand Down
2 changes: 1 addition & 1 deletion providers/github/resources/github_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"time"

"github.com/cockroachdb/errors"
"github.com/google/go-github/v67/github"
"github.com/google/go-github/v69/github"
"go.mondoo.com/cnquery/v11/llx"
"go.mondoo.com/cnquery/v11/logger"
"go.mondoo.com/cnquery/v11/providers-sdk/v1/plugin"
Expand Down
2 changes: 1 addition & 1 deletion providers/github/resources/github_workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strconv"
"strings"

"github.com/google/go-github/v67/github"
"github.com/google/go-github/v69/github"
"go.mondoo.com/cnquery/v11/providers-sdk/v1/util/convert"
"go.mondoo.com/cnquery/v11/providers/github/connection"
"sigs.k8s.io/yaml"
Expand Down
Loading