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

fix(deps): update module github.com/google/go-github/v56 to v58 - autoclosed #1035

Closed
wants to merge 1 commit into from
Closed
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 compiler/native/compile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"github.com/go-vela/types/constants"
"github.com/go-vela/types/raw"

"github.com/google/go-github/v56/github"
"github.com/google/go-github/v58/github"

"testing"
"time"
Expand Down Expand Up @@ -1815,7 +1815,7 @@
}

compiler.WithMetadata(m)
compiler.WithRepo(&library.Repo{PipelineType: &tt.args.pipelineType})

Check failure on line 1818 in compiler/native/compile_test.go

View workflow job for this annotation

GitHub Actions / golangci

[golangci] compiler/native/compile_test.go#L1818

G601: Implicit memory aliasing in for loop. (gosec)
Raw output
compiler/native/compile_test.go:1818:50: G601: Implicit memory aliasing in for loop. (gosec)
			compiler.WithRepo(&library.Repo{PipelineType: &tt.args.pipelineType})
			                                              ^

Check failure on line 1818 in compiler/native/compile_test.go

View workflow job for this annotation

GitHub Actions / full-review

G601: Implicit memory aliasing in for loop. (gosec)

Check failure on line 1818 in compiler/native/compile_test.go

View workflow job for this annotation

GitHub Actions / diff-review

G601: Implicit memory aliasing in for loop. (gosec)

got, _, err := compiler.Compile(yaml)
if err != nil {
Expand Down Expand Up @@ -3126,7 +3126,7 @@
compiler.WithMetadata(m)

if tt.args.pipelineType != "" {
compiler.WithRepo(&library.Repo{PipelineType: &tt.args.pipelineType})

Check failure on line 3129 in compiler/native/compile_test.go

View workflow job for this annotation

GitHub Actions / golangci

[golangci] compiler/native/compile_test.go#L3129

G601: Implicit memory aliasing in for loop. (gosec)
Raw output
compiler/native/compile_test.go:3129:51: G601: Implicit memory aliasing in for loop. (gosec)
				compiler.WithRepo(&library.Repo{PipelineType: &tt.args.pipelineType})
				                                              ^

Check failure on line 3129 in compiler/native/compile_test.go

View workflow job for this annotation

GitHub Actions / full-review

G601: Implicit memory aliasing in for loop. (gosec)

Check failure on line 3129 in compiler/native/compile_test.go

View workflow job for this annotation

GitHub Actions / diff-review

G601: Implicit memory aliasing in for loop. (gosec)
}

got, _, err := compiler.Compile(yaml)
Expand Down
2 changes: 1 addition & 1 deletion compiler/registry/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"net/url"
"strings"

"github.com/google/go-github/v56/github"
"github.com/google/go-github/v58/github"
"golang.org/x/oauth2"
)

Expand Down Expand Up @@ -38,7 +38,7 @@
if !strings.EqualFold(c.URL, address) {
c.URL = strings.Trim(address, "/")
if !strings.Contains(c.URL, "https://github.com") {
c.API = c.URL + "/api/v3/"

Check failure on line 41 in compiler/registry/github/github.go

View workflow job for this annotation

GitHub Actions / golangci

[golangci] compiler/registry/github/github.go#L41

string `/api/v3/` has 5 occurrences, make it a constant (goconst)
Raw output
compiler/registry/github/github.go:41:21: string `/api/v3/` has 5 occurrences, make it a constant (goconst)
				c.API = c.URL + "/api/v3/"
				                ^

Check failure on line 41 in compiler/registry/github/github.go

View workflow job for this annotation

GitHub Actions / full-review

string `/api/v3/` has 5 occurrences, make it a constant (goconst)

Check failure on line 41 in compiler/registry/github/github.go

View workflow job for this annotation

GitHub Actions / diff-review

string `/api/v3/` has 5 occurrences, make it a constant (goconst)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/registry/github/github_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"reflect"
"testing"

"github.com/google/go-github/v56/github"
"github.com/google/go-github/v58/github"
"golang.org/x/oauth2"
)

Expand Down
2 changes: 1 addition & 1 deletion compiler/registry/github/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/go-vela/types/library"

"github.com/google/go-github/v56/github"
"github.com/google/go-github/v58/github"
)

// Template captures the templated pipeline configuration from the GitHub repo.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/go-vela/types v0.22.1-0.20240122175704-d058de26b401
github.com/golang-jwt/jwt/v5 v5.1.0
github.com/google/go-cmp v0.6.0
github.com/google/go-github/v56 v56.0.0
github.com/google/go-github/v58 v58.0.0
github.com/google/uuid v1.4.0
github.com/goware/urlx v0.3.2
github.com/hashicorp/go-cleanhttp v0.5.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ github.com/google/go-cmp v0.5.4/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/v56 v56.0.0 h1:TysL7dMa/r7wsQi44BjqlwaHvwlFlqkK8CtBWCX3gb4=
github.com/google/go-github/v56 v56.0.0/go.mod h1:D8cdcX98YWJvi7TLo7zM4/h8ZTx6u6fwGEkCdisopo0=
github.com/google/go-github/v58 v58.0.0 h1:Una7GGERlF/37XfkPwpzYJe0Vp4dt2k1kCjlxwjIvzw=
github.com/google/go-github/v58 v58.0.0/go.mod h1:k4hxDKEfoWpSqFlc8LTpGd9fu2KrV1YAa6Hi6FmDNY4=
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 scm/github/access.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"github.com/sirupsen/logrus"

"github.com/go-vela/types/library"
"github.com/google/go-github/v56/github"
"github.com/google/go-github/v58/github"
)

// OrgAccess captures the user's access level for an org.
Expand All @@ -31,7 +31,7 @@
}

// create GitHub OAuth client with user's token
client := c.newClientToken(*u.Token)

Check failure on line 34 in scm/github/access.go

View workflow job for this annotation

GitHub Actions / golangci

[golangci] scm/github/access.go#L34

Function `newClientToken` should pass the context parameter (contextcheck)
Raw output
scm/github/access.go:34:28: Function `newClientToken` should pass the context parameter (contextcheck)
	client := c.newClientToken(*u.Token)
	                          ^

// send API call to capture org access level for user
membership, _, err := client.Organizations.GetOrgMembership(ctx, *u.Name, org)
Expand Down Expand Up @@ -100,7 +100,7 @@
}

// create GitHub OAuth client with user's token
client := c.newClientToken(u.GetToken())

Check failure on line 103 in scm/github/access.go

View workflow job for this annotation

GitHub Actions / golangci

[golangci] scm/github/access.go#L103

Function `newClientToken` should pass the context parameter (contextcheck)
Raw output
scm/github/access.go:103:28: Function `newClientToken` should pass the context parameter (contextcheck)
	client := c.newClientToken(u.GetToken())
	                          ^
teams := []*github.Team{}

// set the max per page for the options to capture the list of repos
Expand Down Expand Up @@ -150,7 +150,7 @@
}).Tracef("capturing %s team membership for org %s", u.GetName(), org)

// create GitHub OAuth client with user's token
client := c.newClientToken(u.GetToken())

Check failure on line 153 in scm/github/access.go

View workflow job for this annotation

GitHub Actions / golangci

[golangci] scm/github/access.go#L153

Function `newClientToken` should pass the context parameter (contextcheck)
Raw output
scm/github/access.go:153:28: Function `newClientToken` should pass the context parameter (contextcheck)
	client := c.newClientToken(u.GetToken())
	                          ^
teams := []*github.Team{}

// set the max per page for the options to capture the list of repos
Expand Down
2 changes: 1 addition & 1 deletion scm/github/authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

"github.com/go-vela/server/random"
"github.com/go-vela/types/library"
"github.com/google/go-github/v56/github"
"github.com/google/go-github/v58/github"
)

// Authorize uses the given access token to authorize the user.
Expand Down Expand Up @@ -55,7 +55,7 @@

// Authenticate completes the authentication workflow for the session
// and returns the remote user details.
func (c *client) Authenticate(ctx context.Context, w http.ResponseWriter, r *http.Request, oAuthState string) (*library.User, error) {

Check failure on line 58 in scm/github/authentication.go

View workflow job for this annotation

GitHub Actions / golangci

[golangci] scm/github/authentication.go#L58

unused-parameter: parameter 'w' seems to be unused, consider removing or renaming it as _ (revive)
Raw output
scm/github/authentication.go:58:52: unused-parameter: parameter 'w' seems to be unused, consider removing or renaming it as _ (revive)
func (c *client) Authenticate(ctx context.Context, w http.ResponseWriter, r *http.Request, oAuthState string) (*library.User, error) {
                                                   ^
c.Logger.Trace("authenticating user")

// get the OAuth code
Expand Down
2 changes: 1 addition & 1 deletion scm/github/changeset.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/sirupsen/logrus"

"github.com/go-vela/types/library"
"github.com/google/go-github/v56/github"
"github.com/google/go-github/v58/github"
)

// Changeset captures the list of files changed for a commit.
Expand Down
2 changes: 1 addition & 1 deletion scm/github/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/go-vela/types/library"
"github.com/go-vela/types/raw"
"github.com/google/go-github/v56/github"
"github.com/google/go-github/v58/github"
)

// GetDeployment gets a deployment from the GitHub repo.
Expand Down
2 changes: 1 addition & 1 deletion scm/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"
"net/url"

"github.com/google/go-github/v56/github"
"github.com/google/go-github/v58/github"
"github.com/sirupsen/logrus"

"golang.org/x/oauth2"
Expand Down
2 changes: 1 addition & 1 deletion scm/github/github_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"reflect"
"testing"

"github.com/google/go-github/v56/github"
"github.com/google/go-github/v58/github"
"golang.org/x/oauth2"
)

Expand Down
2 changes: 1 addition & 1 deletion scm/github/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

"github.com/go-vela/types/constants"
"github.com/go-vela/types/library"
"github.com/google/go-github/v56/github"
"github.com/google/go-github/v58/github"
)

// ConfigBackoff is a wrapper for Config that will retry five times if the function
Expand Down Expand Up @@ -447,7 +447,7 @@
// loop to capture *ALL* the repos
for {
// send API call to capture the user's repos
repos, resp, err := client.Repositories.List(ctx, "", opts)

Check failure on line 450 in scm/github/repo.go

View workflow job for this annotation

GitHub Actions / golangci

[golangci] scm/github/repo.go#L450

SA1019: client.Repositories.List is deprecated: Use RepositoriesService.ListByUser or RepositoriesService.ListByAuthenticatedUser instead. (staticcheck)
Raw output
scm/github/repo.go:450:23: SA1019: client.Repositories.List is deprecated: Use RepositoriesService.ListByUser or RepositoriesService.ListByAuthenticatedUser instead. (staticcheck)
		repos, resp, err := client.Repositories.List(ctx, "", opts)
		                    ^
if err != nil {
return nil, fmt.Errorf("unable to list user repos: %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion scm/github/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/go-vela/types"
"github.com/go-vela/types/constants"
"github.com/go-vela/types/library"
"github.com/google/go-github/v56/github"
"github.com/google/go-github/v58/github"
)

// ProcessWebhook parses the webhook from a repo.
Expand Down
Loading