Skip to content

Commit

Permalink
Updating go toi go1.21
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
souleb committed Dec 11, 2023
1 parent eca42bf commit c03bf60
Show file tree
Hide file tree
Showing 28 changed files with 88 additions and 90 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.20.x
go-version: 1.21.x
- name: Run vet
run: make tidy fmt vet
- name: Check if working tree is dirty
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-gitea.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.20.x
go-version: 1.21.x
- name: Start Provider instances
run: make start-provider-instances-gitea GITEA_VERSION=1.19.3@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a
- name: Run tests [gitea]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-github.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.20.x
go-version: 1.21.x
- name: Run tests
run: |
[ -n "${{ secrets.GITPROVIDER_BOT_TOKEN }}" ] && export GITHUB_TOKEN=${{ secrets.GITPROVIDER_BOT_TOKEN }} || echo "using default GITHUB_TOKEN"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-gitlab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.20.x
go-version: 1.21.x
- name: Start Provider instances
run: make start-provider-instances-gitlab
- name: Run tests [gitlab]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-stash.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.20.x
go-version: 1.21.x
- name: Run tests
run: |
[ -n "${{ secrets.STASH_TOKEN }}" ] && export STASH_TOKEN=${{ secrets.STASH_TOKEN }} || echo "using default STASH_TOKEN"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.20.x
go-version: 1.21.x
- name: Download release notes utility
env:
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
Expand Down
2 changes: 1 addition & 1 deletion github/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package github
import (
"fmt"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/fluxcd/go-git-providers/gitprovider"
)
Expand Down
2 changes: 1 addition & 1 deletion github/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"
"strings"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/fluxcd/go-git-providers/gitprovider"
)
Expand Down
2 changes: 1 addition & 1 deletion github/client_organization_teams.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/fluxcd/go-git-providers/gitprovider"
)
Expand Down
2 changes: 1 addition & 1 deletion github/client_repositories_org.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"
"errors"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/fluxcd/go-git-providers/gitprovider"
)
Expand Down
2 changes: 1 addition & 1 deletion github/client_repository_branch.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
)

// BranchClient implements the gitprovider.BranchClient interface.
Expand Down
4 changes: 2 additions & 2 deletions github/client_repository_commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
)

var githubNewFileMode = "100644"
Expand Down Expand Up @@ -106,7 +106,7 @@ func (c *CommitClient) Create(ctx context.Context, branch string, message string
SHA: &latestCommitSHA,
},
},
})
}, nil)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion github/client_repository_deploykey.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"
"errors"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/fluxcd/go-git-providers/gitprovider"
)
Expand Down
2 changes: 1 addition & 1 deletion github/client_repository_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"io"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
)

// FileClient implements the gitprovider.FileClient interface.
Expand Down
2 changes: 1 addition & 1 deletion github/client_repository_pullrequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
)

// PullRequestClient implements the gitprovider.PullRequestClient interface.
Expand Down
2 changes: 1 addition & 1 deletion github/example_organization_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/fluxcd/go-git-providers/github"
"github.com/fluxcd/go-git-providers/gitprovider"
gogithub "github.com/google/go-github/v55/github"
gogithub "github.com/google/go-github/v57/github"
)

// checkErr is used for examples in this repository.
Expand Down
2 changes: 1 addition & 1 deletion github/example_repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/fluxcd/go-git-providers/github"
"github.com/fluxcd/go-git-providers/gitprovider"
gogithub "github.com/google/go-github/v55/github"
gogithub "github.com/google/go-github/v57/github"
)

func ExampleOrgRepositoriesClient_Get() {
Expand Down
2 changes: 1 addition & 1 deletion github/githubclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
)

// githubClientImpl is a wrapper around *github.Client, which implements higher-level methods,
Expand Down
2 changes: 1 addition & 1 deletion github/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"testing"
"time"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
"github.com/gregjones/httpcache"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion github/resource_commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package github

import (
"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/fluxcd/go-git-providers/gitprovider"
)
Expand Down
2 changes: 1 addition & 1 deletion github/resource_deploykey.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"fmt"
"reflect"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/fluxcd/go-git-providers/validation"
Expand Down
2 changes: 1 addition & 1 deletion github/resource_organization.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package github

import (
"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/fluxcd/go-git-providers/validation"
Expand Down
2 changes: 1 addition & 1 deletion github/resource_pullrequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package github

import (
"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
)

func newPullRequest(ctx *clientContext, apiObj *github.PullRequest) *pullrequest {
Expand Down
2 changes: 1 addition & 1 deletion github/resource_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"errors"
"reflect"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/fluxcd/go-git-providers/validation"
Expand Down
2 changes: 1 addition & 1 deletion github/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"
"net/http"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/fluxcd/go-git-providers/validation"
Expand Down
2 changes: 1 addition & 1 deletion github/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/fluxcd/go-git-providers/validation"
"github.com/google/go-github/v55/github"
"github.com/google/go-github/v57/github"
)

func Test_validateAPIObject(t *testing.T) {
Expand Down
35 changes: 16 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,34 +1,31 @@
module github.com/fluxcd/go-git-providers

go 1.20
go 1.21

require (
code.gitea.io/sdk/gitea v0.16.0
code.gitea.io/sdk/gitea v0.17.0
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371
github.com/go-git/go-billy/v5 v5.5.0
github.com/go-git/go-git/v5 v5.9.0
github.com/go-logr/logr v1.2.4
github.com/go-logr/zapr v1.2.3
github.com/google/go-cmp v0.5.9
github.com/google/go-github/v55 v55.0.0
github.com/go-logr/logr v1.3.0
github.com/go-logr/zapr v1.3.0
github.com/google/go-cmp v0.6.0
github.com/google/go-github/v57 v57.0.0
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79
github.com/hashicorp/go-cleanhttp v0.5.2
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/go-retryablehttp v0.7.4
github.com/ktrysmt/go-bitbucket v0.9.68
github.com/hashicorp/go-retryablehttp v0.7.5
github.com/ktrysmt/go-bitbucket v0.9.73
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.28.0
github.com/xanzy/go-gitlab v0.93.1
github.com/onsi/gomega v1.30.0
github.com/xanzy/go-gitlab v0.95.1
go.uber.org/zap v1.26.0
golang.org/x/crypto v0.14.0
golang.org/x/oauth2 v0.13.0
golang.org/x/time v0.3.0
golang.org/x/crypto v0.16.0
golang.org/x/oauth2 v0.15.0
golang.org/x/time v0.5.0
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
)

// Fix CVE-2022-28948
replace gopkg.in/yaml.v3 => gopkg.in/yaml.v3 v3.0.1

require (
dario.cat/mergo v1.0.0 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
Expand All @@ -55,9 +52,9 @@ require (
github.com/xanzy/ssh-agent v0.3.3 // indirect
go.uber.org/multierr v1.10.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.13.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.31.0 // indirect
Expand Down
Loading

0 comments on commit c03bf60

Please sign in to comment.