Skip to content

Commit

Permalink
feat: update go-github
Browse files Browse the repository at this point in the history
  • Loading branch information
christophwitzko committed Oct 13, 2024
1 parent 7c1f05c commit b4da0eb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.23
require (
github.com/Masterminds/semver/v3 v3.3.0
github.com/go-semantic-release/semantic-release/v2 v2.31.0
github.com/google/go-github/v49 v49.1.1-0.20230111123143-ced4abd274f3
github.com/google/go-github/v66 v66.0.0
github.com/stretchr/testify v1.9.0
golang.org/x/oauth2 v0.23.0
)
Expand Down Expand Up @@ -39,7 +39,6 @@ require (
github.com/spf13/viper v1.19.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.28.0 // indirect
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/sys v0.26.0 // indirect
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6
github.com/google/go-cmp v0.5.2/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/v49 v49.1.1-0.20230111123143-ced4abd274f3 h1:Sd43yTZTNq3mx1j6W+LeAS3gMFWAKIDS23TK6fFZi/c=
github.com/google/go-github/v49 v49.1.1-0.20230111123143-ced4abd274f3/go.mod h1:MUUzHPrhGniB6vUKa27y37likpipzG+BXXJbG04J334=
github.com/google/go-github/v66 v66.0.0 h1:ADJsaXj9UotwdgK8/iFZtv7MLc8E8WBl62WLd/D/9+M=
github.com/google/go-github/v66 v66.0.0/go.mod h1:+4SO9Zkuyf8ytMj0csN1NR/5OTR+MfqPp8P8dVlcvY4=
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/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=
Expand Down Expand Up @@ -90,8 +90,6 @@ github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw=
golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U=
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c h1:7dEasQXItcW1xKJ2+gg5VOiBnqWrJc+rq0DPKyvvdbY=
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8=
golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4=
Expand Down
4 changes: 2 additions & 2 deletions pkg/provider/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/Masterminds/semver/v3"
"github.com/go-semantic-release/semantic-release/v2/pkg/provider"
"github.com/go-semantic-release/semantic-release/v2/pkg/semrel"
"github.com/google/go-github/v49/github"
"github.com/google/go-github/v66/github"
"golang.org/x/oauth2"
)

Expand Down Expand Up @@ -57,7 +57,7 @@ func (repo *GitHubRepository) Init(config map[string]string) error {
oauthClient := oauth2.NewClient(context.Background(), oauth2.StaticTokenSource(&oauth2.Token{AccessToken: token}))
if gheHost != "" {
gheURL := fmt.Sprintf("https://%s/api/v3/", gheHost)
rClient, err := github.NewEnterpriseClient(gheURL, gheURL, oauthClient)
rClient, err := github.NewClient(oauthClient).WithEnterpriseURLs(gheURL, gheURL)
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/provider/github_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"github.com/go-semantic-release/semantic-release/v2/pkg/provider"
"github.com/go-semantic-release/semantic-release/v2/pkg/semrel"
"github.com/google/go-github/v49/github"
"github.com/google/go-github/v66/github"
"github.com/stretchr/testify/require"
)

Expand Down Expand Up @@ -56,7 +56,7 @@ var (
githubAuthorLogin = "author-login"
githubAuthorName = "author"
githubAuthorEmail = "[email protected]"
githubTimestamp = time.Now()
githubTimestamp = github.Timestamp{Time: time.Now()}

githubAuthor = &github.CommitAuthor{
Name: &githubAuthorName,
Expand Down

0 comments on commit b4da0eb

Please sign in to comment.