Skip to content

Commit f087250

Browse files
authored
Merge pull request #286 from fluxcd/update-go-github-63
Update dependencies
2 parents f5f96d7 + d1a091a commit f087250

23 files changed

+103
-1536
lines changed

github/auth.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package github
1919
import (
2020
"fmt"
2121

22-
"github.com/google/go-github/v61/github"
22+
"github.com/google/go-github/v64/github"
2323

2424
"github.com/fluxcd/go-git-providers/gitprovider"
2525
)

github/client.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"context"
2121
"strings"
2222

23-
"github.com/google/go-github/v61/github"
23+
"github.com/google/go-github/v64/github"
2424

2525
"github.com/fluxcd/go-git-providers/gitprovider"
2626
)
@@ -111,7 +111,7 @@ func (c *Client) HasTokenPermission(ctx context.Context, permission gitprovider.
111111
}
112112

113113
// The X-OAuth-Scopes header is returned for any API calls, using Meta here to keep things simple.
114-
_, res, err := c.c.Client().APIMeta(ctx)
114+
_, res, err := c.c.Client().Meta.Get(ctx)
115115
if err != nil {
116116
return false, err
117117
}

github/client_organization_teams.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package github
1919
import (
2020
"context"
2121

22-
"github.com/google/go-github/v61/github"
22+
"github.com/google/go-github/v64/github"
2323

2424
"github.com/fluxcd/go-git-providers/gitprovider"
2525
)

github/client_repositories_org.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"context"
2121
"errors"
2222

23-
"github.com/google/go-github/v61/github"
23+
"github.com/google/go-github/v64/github"
2424

2525
"github.com/fluxcd/go-git-providers/gitprovider"
2626
)

github/client_repository_branch.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ package github
1919
import (
2020
"context"
2121

22+
"github.com/google/go-github/v64/github"
23+
2224
"github.com/fluxcd/go-git-providers/gitprovider"
23-
"github.com/google/go-github/v61/github"
2425
)
2526

2627
// BranchClient implements the gitprovider.BranchClient interface.

github/client_repository_commit.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"fmt"
2222

2323
"github.com/fluxcd/go-git-providers/gitprovider"
24-
"github.com/google/go-github/v61/github"
24+
"github.com/google/go-github/v64/github"
2525
)
2626

2727
var githubNewFileMode = "100644"

github/client_repository_deploykey.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"context"
2121
"errors"
2222

23-
"github.com/google/go-github/v61/github"
23+
"github.com/google/go-github/v64/github"
2424

2525
"github.com/fluxcd/go-git-providers/gitprovider"
2626
)

github/client_repository_file.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"io"
2424

2525
"github.com/fluxcd/go-git-providers/gitprovider"
26-
"github.com/google/go-github/v61/github"
26+
"github.com/google/go-github/v64/github"
2727
)
2828

2929
// FileClient implements the gitprovider.FileClient interface.

github/client_repository_pullrequest.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"context"
2121

2222
"github.com/fluxcd/go-git-providers/gitprovider"
23-
"github.com/google/go-github/v61/github"
23+
"github.com/google/go-github/v64/github"
2424
)
2525

2626
// PullRequestClient implements the gitprovider.PullRequestClient interface.

github/example_organization_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
"github.com/fluxcd/go-git-providers/github"
99
"github.com/fluxcd/go-git-providers/gitprovider"
10-
gogithub "github.com/google/go-github/v61/github"
10+
gogithub "github.com/google/go-github/v64/github"
1111
)
1212

1313
// checkErr is used for examples in this repository.

github/example_repository_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/fluxcd/go-git-providers/github"
88
"github.com/fluxcd/go-git-providers/gitprovider"
9-
gogithub "github.com/google/go-github/v61/github"
9+
gogithub "github.com/google/go-github/v64/github"
1010
)
1111

1212
func ExampleOrgRepositoriesClient_Get() {

github/githubclient.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"fmt"
2222

2323
"github.com/fluxcd/go-git-providers/gitprovider"
24-
"github.com/google/go-github/v61/github"
24+
"github.com/google/go-github/v64/github"
2525
)
2626

2727
// githubClientImpl is a wrapper around *github.Client, which implements higher-level methods,

github/integration_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
"testing"
3232
"time"
3333

34-
"github.com/google/go-github/v61/github"
34+
"github.com/google/go-github/v64/github"
3535
"github.com/gregjones/httpcache"
3636
. "github.com/onsi/ginkgo"
3737
. "github.com/onsi/gomega"

github/resource_commit.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ limitations under the License.
1717
package github
1818

1919
import (
20-
"github.com/google/go-github/v61/github"
20+
"github.com/google/go-github/v64/github"
2121

2222
"github.com/fluxcd/go-git-providers/gitprovider"
2323
)

github/resource_deploykey.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"fmt"
2323
"reflect"
2424

25-
"github.com/google/go-github/v61/github"
25+
"github.com/google/go-github/v64/github"
2626

2727
"github.com/fluxcd/go-git-providers/gitprovider"
2828
"github.com/fluxcd/go-git-providers/validation"

github/resource_organization.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ limitations under the License.
1717
package github
1818

1919
import (
20-
"github.com/google/go-github/v61/github"
20+
"github.com/google/go-github/v64/github"
2121

2222
"github.com/fluxcd/go-git-providers/gitprovider"
2323
"github.com/fluxcd/go-git-providers/validation"

github/resource_pullrequest.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package github
1818

1919
import (
2020
"github.com/fluxcd/go-git-providers/gitprovider"
21-
"github.com/google/go-github/v61/github"
21+
"github.com/google/go-github/v64/github"
2222
)
2323

2424
func newPullRequest(ctx *clientContext, apiObj *github.PullRequest) *pullrequest {

github/resource_repository.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"errors"
2222
"reflect"
2323

24-
"github.com/google/go-github/v61/github"
24+
"github.com/google/go-github/v64/github"
2525

2626
"github.com/fluxcd/go-git-providers/gitprovider"
2727
"github.com/fluxcd/go-git-providers/validation"

github/util.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"fmt"
2222
"net/http"
2323

24-
"github.com/google/go-github/v61/github"
24+
"github.com/google/go-github/v64/github"
2525

2626
"github.com/fluxcd/go-git-providers/gitprovider"
2727
"github.com/fluxcd/go-git-providers/validation"

github/util_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323

2424
"github.com/fluxcd/go-git-providers/gitprovider"
2525
"github.com/fluxcd/go-git-providers/validation"
26-
"github.com/google/go-github/v61/github"
26+
"github.com/google/go-github/v64/github"
2727
)
2828

2929
func Test_validateAPIObject(t *testing.T) {

gitlab/util.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import (
66
"net/http"
77
"strings"
88

9+
"github.com/xanzy/go-gitlab"
10+
911
"github.com/fluxcd/go-git-providers/gitprovider"
1012
"github.com/fluxcd/go-git-providers/validation"
11-
"github.com/xanzy/go-gitlab"
1213
)
1314

1415
const (
@@ -226,6 +227,11 @@ func handleHTTPError(err error) error {
226227
if err == nil {
227228
return nil
228229
}
230+
231+
if errors.Is(err, gitlab.ErrNotFound) {
232+
return validation.NewMultiError(err, gitprovider.ErrNotFound)
233+
}
234+
229235
glErrorResponse := &gitlab.ErrorResponse{}
230236
if errors.As(err, &glErrorResponse) {
231237
httpErr := gitprovider.HTTPError{

go.mod

+21-21
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,61 @@ module github.com/fluxcd/go-git-providers
22

33
go 1.22
44

5+
// Includes fix: https://github.com/google/go-github/pull/3249
6+
replace github.com/google/go-github/v64 => github.com/google/go-github/v64 v64.0.1-0.20240826145430-da7d01467641
7+
58
require (
6-
code.gitea.io/sdk/gitea v0.17.1
9+
code.gitea.io/sdk/gitea v0.19.0
710
github.com/ProtonMail/go-crypto v1.0.0
811
github.com/go-git/go-billy/v5 v5.5.0
912
github.com/go-git/go-git/v5 v5.12.0
10-
github.com/go-logr/logr v1.4.1
13+
github.com/go-logr/logr v1.4.2
1114
github.com/go-logr/zapr v1.3.0
1215
github.com/google/go-cmp v0.6.0
13-
github.com/google/go-github/v61 v61.0.0
16+
github.com/google/go-github/v64 v64.0.0
1417
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79
1518
github.com/hashicorp/go-cleanhttp v0.5.2
1619
github.com/hashicorp/go-multierror v1.1.1
17-
github.com/hashicorp/go-retryablehttp v0.7.5
18-
github.com/ktrysmt/go-bitbucket v0.9.77
20+
github.com/hashicorp/go-retryablehttp v0.7.7
21+
github.com/ktrysmt/go-bitbucket v0.9.80
1922
github.com/onsi/ginkgo v1.16.5
2023
github.com/onsi/gomega v1.32.0
21-
github.com/xanzy/go-gitlab v0.101.0
24+
github.com/xanzy/go-gitlab v0.107.0
2225
go.uber.org/zap v1.27.0
23-
golang.org/x/crypto v0.21.0
24-
golang.org/x/oauth2 v0.18.0
26+
golang.org/x/crypto v0.26.0
27+
golang.org/x/oauth2 v0.20.0
2528
golang.org/x/time v0.5.0
2629
k8s.io/utils v0.0.0-20240310230437-4693a0247e57
2730
)
2831

2932
require (
3033
dario.cat/mergo v1.0.0 // indirect
31-
github.com/Microsoft/go-winio v0.6.1 // indirect
32-
github.com/cloudflare/circl v1.3.7 // indirect
33-
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
34+
github.com/Microsoft/go-winio v0.6.2 // indirect
35+
github.com/cloudflare/circl v1.3.9 // indirect
36+
github.com/cyphar/filepath-securejoin v0.3.1 // indirect
3437
github.com/davidmz/go-pageant v1.0.2 // indirect
3538
github.com/emirpasic/gods v1.18.1 // indirect
3639
github.com/fsnotify/fsnotify v1.4.9 // indirect
3740
github.com/go-fed/httpsig v1.1.0 // indirect
3841
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
3942
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
40-
github.com/golang/protobuf v1.5.3 // indirect
4143
github.com/google/go-querystring v1.1.0 // indirect
4244
github.com/hashicorp/errwrap v1.1.0 // indirect
43-
github.com/hashicorp/go-version v1.6.0 // indirect
45+
github.com/hashicorp/go-version v1.7.0 // indirect
4446
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
4547
github.com/kevinburke/ssh_config v1.2.0 // indirect
4648
github.com/mitchellh/mapstructure v1.5.0 // indirect
4749
github.com/nxadm/tail v1.4.8 // indirect
4850
github.com/pjbgf/sha1cd v0.3.0 // indirect
4951
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
50-
github.com/skeema/knownhosts v1.2.2 // indirect
52+
github.com/skeema/knownhosts v1.3.0 // indirect
5153
github.com/xanzy/ssh-agent v0.3.3 // indirect
5254
go.uber.org/multierr v1.10.0 // indirect
53-
golang.org/x/mod v0.16.0 // indirect
54-
golang.org/x/net v0.23.0 // indirect
55-
golang.org/x/sys v0.18.0 // indirect
56-
golang.org/x/text v0.14.0 // indirect
57-
golang.org/x/tools v0.19.0 // indirect
58-
google.golang.org/appengine v1.6.8 // indirect
59-
google.golang.org/protobuf v1.33.0 // indirect
55+
golang.org/x/net v0.28.0 // indirect
56+
golang.org/x/sys v0.24.0 // indirect
57+
golang.org/x/text v0.17.0 // indirect
58+
golang.org/x/tools v0.24.0 // indirect
59+
google.golang.org/protobuf v1.34.2 // indirect
6060
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
6161
gopkg.in/warnings.v0 v0.1.2 // indirect
6262
gopkg.in/yaml.v3 v3.0.1 // indirect

0 commit comments

Comments
 (0)