Skip to content

Commit

Permalink
use github sdk v57.
Browse files Browse the repository at this point in the history
  • Loading branch information
cguertin14 committed Dec 13, 2023
1 parent c14b32e commit 3524cb0
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 14 deletions.
3 changes: 0 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ go 1.20
require (
github.com/cguertin14/logger v1.0.6
github.com/golang/mock v1.6.0
github.com/google/go-github/v43 v43.0.0
github.com/google/go-github/v57 v57.0.0
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.18.1
Expand All @@ -16,7 +15,6 @@ require (
require (
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
Expand All @@ -33,7 +31,6 @@ require (
github.com/subosito/gotenv v1.6.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/crypto v0.16.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sys v0.15.0 // indirect
Expand Down
6 changes: 1 addition & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
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/v43 v43.0.0 h1:y+GL7LIsAIF2NZlJ46ZoC/D1W1ivZasT0lnWHMYPZ+U=
github.com/google/go-github/v43 v43.0.0/go.mod h1:ZkTvvmCXBvsfPpTHXnH/d2hP9Y0cTbvN9kr5xqyXOIc=
github.com/google/go-github/v57 v57.0.0 h1:L+Y3UPTY8ALM8x+TV0lg+IEBI+upibemtBD8Q9u7zHs=
github.com/google/go-github/v57 v57.0.0/go.mod h1:s0omdnye0hvK/ecLvpsGfJMiRt85PimQh4oygmLIxHw=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
Expand Down Expand Up @@ -74,8 +72,6 @@ go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI=
go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY=
golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
Expand Down
2 changes: 1 addition & 1 deletion pkg/github/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package legacy
import (
"context"

"github.com/google/go-github/v43/github"
"github.com/google/go-github/v57/github"
"golang.org/x/oauth2"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/github/mocks/mock_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkg/updater/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

legacy "github.com/cguertin14/k3supdater/pkg/github"
"github.com/cguertin14/logger"
"github.com/google/go-github/v43/github"
"github.com/google/go-github/v57/github"
"golang.org/x/mod/semver"
)

Expand Down Expand Up @@ -196,7 +196,7 @@ func (c *ClientSet) updateFile(ctx context.Context, req updateFileReq) (err erro
Committer: &github.CommitAuthor{
Name: github.String("k3supdater-bot"),
Email: github.String("[email protected]"),
Date: &now,
Date: &github.Timestamp{Time: now},
},
Message: github.String(
fmt.Sprintf("Updated k3s version %s to %s.", req.currentVersion, *req.latestRelease.Name),
Expand Down
5 changes: 3 additions & 2 deletions pkg/updater/operations_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//+build test
//go:build test
// +build test

package updater

Expand All @@ -11,7 +12,7 @@ import (

github_mocks "github.com/cguertin14/k3supdater/pkg/github/mocks"
"github.com/golang/mock/gomock"
"github.com/google/go-github/v43/github"
"github.com/google/go-github/v57/github"
)

func TestUpdateK3sRelease(t *testing.T) {
Expand Down

0 comments on commit 3524cb0

Please sign in to comment.