Skip to content

Commit c03bf60

Browse files
committed
Updating go toi go1.21
Also updating the following deps: - github.com/google/go-github - code.gitea.io/sdk/gitea - github.com/xanzy/go-gitlab - github.com/go-logr/logr Signed-off-by: Soule BA <[email protected]>
1 parent eca42bf commit c03bf60

28 files changed

+88
-90
lines changed

.github/workflows/build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Setup Go
2323
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
2424
with:
25-
go-version: 1.20.x
25+
go-version: 1.21.x
2626
- name: Run vet
2727
run: make tidy fmt vet
2828
- name: Check if working tree is dirty

.github/workflows/e2e-gitea.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Setup Go
2727
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
2828
with:
29-
go-version: 1.20.x
29+
go-version: 1.21.x
3030
- name: Start Provider instances
3131
run: make start-provider-instances-gitea GITEA_VERSION=1.19.3@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a
3232
- name: Run tests [gitea]

.github/workflows/e2e-github.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Setup Go
2323
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
2424
with:
25-
go-version: 1.20.x
25+
go-version: 1.21.x
2626
- name: Run tests
2727
run: |
2828
[ -n "${{ secrets.GITPROVIDER_BOT_TOKEN }}" ] && export GITHUB_TOKEN=${{ secrets.GITPROVIDER_BOT_TOKEN }} || echo "using default GITHUB_TOKEN"

.github/workflows/e2e-gitlab.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Setup Go
2727
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
2828
with:
29-
go-version: 1.20.x
29+
go-version: 1.21.x
3030
- name: Start Provider instances
3131
run: make start-provider-instances-gitlab
3232
- name: Run tests [gitlab]

.github/workflows/e2e-stash.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Setup Go
2323
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
2424
with:
25-
go-version: 1.20.x
25+
go-version: 1.21.x
2626
- name: Run tests
2727
run: |
2828
[ -n "${{ secrets.STASH_TOKEN }}" ] && export STASH_TOKEN=${{ secrets.STASH_TOKEN }} || echo "using default STASH_TOKEN"

.github/workflows/release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Setup Go
2424
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
2525
with:
26-
go-version: 1.20.x
26+
go-version: 1.21.x
2727
- name: Download release notes utility
2828
env:
2929
GH_REL_URL: https://github.com/buchanae/github-release-notes/releases/download/0.2.0/github-release-notes-linux-amd64-0.2.0.tar.gz

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/v55/github"
22+
"github.com/google/go-github/v57/github"
2323

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

github/client.go

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

23-
"github.com/google/go-github/v55/github"
23+
"github.com/google/go-github/v57/github"
2424

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

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/v55/github"
22+
"github.com/google/go-github/v57/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/v55/github"
23+
"github.com/google/go-github/v57/github"
2424

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

github/client_repository_branch.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/v55/github"
23+
"github.com/google/go-github/v57/github"
2424
)
2525

2626
// BranchClient implements the gitprovider.BranchClient interface.

github/client_repository_commit.go

+2-2
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/v55/github"
24+
"github.com/google/go-github/v57/github"
2525
)
2626

2727
var githubNewFileMode = "100644"
@@ -106,7 +106,7 @@ func (c *CommitClient) Create(ctx context.Context, branch string, message string
106106
SHA: &latestCommitSHA,
107107
},
108108
},
109-
})
109+
}, nil)
110110
if err != nil {
111111
return nil, err
112112
}

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/v55/github"
23+
"github.com/google/go-github/v57/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
@@ -22,7 +22,7 @@ import (
2222
"io"
2323

2424
"github.com/fluxcd/go-git-providers/gitprovider"
25-
"github.com/google/go-github/v55/github"
25+
"github.com/google/go-github/v57/github"
2626
)
2727

2828
// 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/v55/github"
23+
"github.com/google/go-github/v57/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/v55/github"
10+
gogithub "github.com/google/go-github/v57/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/v55/github"
9+
gogithub "github.com/google/go-github/v57/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/v55/github"
24+
"github.com/google/go-github/v57/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/v55/github"
34+
"github.com/google/go-github/v57/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/v55/github"
20+
"github.com/google/go-github/v57/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/v55/github"
25+
"github.com/google/go-github/v57/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/v55/github"
20+
"github.com/google/go-github/v57/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/v55/github"
21+
"github.com/google/go-github/v57/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/v55/github"
24+
"github.com/google/go-github/v57/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/v55/github"
24+
"github.com/google/go-github/v57/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/v55/github"
26+
"github.com/google/go-github/v57/github"
2727
)
2828

2929
func Test_validateAPIObject(t *testing.T) {

go.mod

+16-19
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,31 @@
11
module github.com/fluxcd/go-git-providers
22

3-
go 1.20
3+
go 1.21
44

55
require (
6-
code.gitea.io/sdk/gitea v0.16.0
6+
code.gitea.io/sdk/gitea v0.17.0
77
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371
88
github.com/go-git/go-billy/v5 v5.5.0
99
github.com/go-git/go-git/v5 v5.9.0
10-
github.com/go-logr/logr v1.2.4
11-
github.com/go-logr/zapr v1.2.3
12-
github.com/google/go-cmp v0.5.9
13-
github.com/google/go-github/v55 v55.0.0
10+
github.com/go-logr/logr v1.3.0
11+
github.com/go-logr/zapr v1.3.0
12+
github.com/google/go-cmp v0.6.0
13+
github.com/google/go-github/v57 v57.0.0
1414
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79
1515
github.com/hashicorp/go-cleanhttp v0.5.2
1616
github.com/hashicorp/go-multierror v1.1.1
17-
github.com/hashicorp/go-retryablehttp v0.7.4
18-
github.com/ktrysmt/go-bitbucket v0.9.68
17+
github.com/hashicorp/go-retryablehttp v0.7.5
18+
github.com/ktrysmt/go-bitbucket v0.9.73
1919
github.com/onsi/ginkgo v1.16.5
20-
github.com/onsi/gomega v1.28.0
21-
github.com/xanzy/go-gitlab v0.93.1
20+
github.com/onsi/gomega v1.30.0
21+
github.com/xanzy/go-gitlab v0.95.1
2222
go.uber.org/zap v1.26.0
23-
golang.org/x/crypto v0.14.0
24-
golang.org/x/oauth2 v0.13.0
25-
golang.org/x/time v0.3.0
23+
golang.org/x/crypto v0.16.0
24+
golang.org/x/oauth2 v0.15.0
25+
golang.org/x/time v0.5.0
2626
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
2727
)
2828

29-
// Fix CVE-2022-28948
30-
replace gopkg.in/yaml.v3 => gopkg.in/yaml.v3 v3.0.1
31-
3229
require (
3330
dario.cat/mergo v1.0.0 // indirect
3431
github.com/Microsoft/go-winio v0.6.1 // indirect
@@ -55,9 +52,9 @@ require (
5552
github.com/xanzy/ssh-agent v0.3.3 // indirect
5653
go.uber.org/multierr v1.10.0 // indirect
5754
golang.org/x/mod v0.12.0 // indirect
58-
golang.org/x/net v0.17.0 // indirect
59-
golang.org/x/sys v0.13.0 // indirect
60-
golang.org/x/text v0.13.0 // indirect
55+
golang.org/x/net v0.19.0 // indirect
56+
golang.org/x/sys v0.15.0 // indirect
57+
golang.org/x/text v0.14.0 // indirect
6158
golang.org/x/tools v0.13.0 // indirect
6259
google.golang.org/appengine v1.6.7 // indirect
6360
google.golang.org/protobuf v1.31.0 // indirect

0 commit comments

Comments
 (0)