Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## To Be Released

* build(deps): update `github.com/google/go-github` from v47 to v88

## 1.45.0

* fix(addons): parse `maintenance-window-hour` as an int
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/dustin/go-humanize v1.0.1
github.com/fatih/color v1.19.0
github.com/go-git/go-git/v5 v5.19.1
github.com/google/go-github/v47 v47.1.0
github.com/google/go-github/v88 v88.0.0
github.com/gorilla/websocket v1.5.3
github.com/joho/godotenv v1.5.1
github.com/kelseyhightower/envconfig v1.4.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ github.com/google/go-cmp v0.2.1-0.20190312032427-6f77996f0c42/go.mod h1:8QqcDgzr
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/go-github/v47 v47.1.0 h1:Cacm/WxQBOa9lF0FT0EMjZ2BWMetQ1TQfyurn4yF1z8=
github.com/google/go-github/v47 v47.1.0/go.mod h1:VPZBXNbFSJGjyjFRUKo9vZGawTajnWzC/YjGw/oFKi0=
github.com/google/go-github/v88 v88.0.0 h1:dZA9IKkPK1eXZj4ypngnpRj5FwdpTv4whix2PrQMP7M=
github.com/google/go-github/v88 v88.0.0/go.mod h1:rufTDgn2N45wjhukLTyxmvc9nilSp3mr3Rgtt6b1MPw=
github.com/google/go-querystring v1.2.0 h1:yhqkPbu2/OH+V9BfpCVPZkNmUXhb2gBxJArfhIxNtP0=
github.com/google/go-querystring v1.2.0/go.mod h1:8IFJqpSRITyJ8QhQ13bmbeMBDfmeEJZD5A0egEOmkqU=
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
Expand Down
17 changes: 11 additions & 6 deletions services/github/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"time"

"github.com/google/go-github/v47/github"
"github.com/google/go-github/v88/github"

"github.com/Scalingo/go-scalingo/v11/debug"
"github.com/Scalingo/go-utils/errors/v3"
Expand All @@ -19,12 +19,17 @@ type client struct {
githubRepositoriesService *github.RepositoriesService
}

func NewClient() Client {
return client{
githubRepositoriesService: github.NewClient(&http.Client{
Timeout: 5 * time.Second,
}).Repositories,
func NewClient(ctx context.Context) (Client, error) {
githubClient, err := github.NewClient(github.WithHTTPClient(&http.Client{
Timeout: 5 * time.Second,
}))
if err != nil {
return nil, errors.Wrapf(ctx, err, "initialize GitHub HTTP client")
}

return client{
githubRepositoriesService: githubClient.Repositories,
}, nil
}

func (c client) GetLatestRelease(ctx context.Context) (*github.RepositoryRelease, error) {
Expand Down
9 changes: 7 additions & 2 deletions update/changelog.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ import (
)

func ShowLastChangelog(ctx context.Context) error {
cliLastRelease, err := github.NewClient().GetLatestRelease(ctx)
githubClient, err := github.NewClient(ctx)
if err != nil {
return errors.Wrapf(ctx, err, "fail to get last CLI release")
return errors.Wrapf(ctx, err, "initialize GitHub client")
}

cliLastRelease, err := githubClient.GetLatestRelease(ctx)
if err != nil {
return errors.Wrapf(ctx, err, "get last CLI release")
}

if cliLastRelease.GetBody() == "" {
Expand Down
143 changes: 0 additions & 143 deletions vendor/github.com/google/go-github/v47/github/actions_artifacts.go

This file was deleted.

Loading