From ce5c5f504c3b442dd42e7e1b4c912b6de9bafcf6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Sep 2021 09:11:46 +0000 Subject: [PATCH 1/2] build(deps): bump github.com/Scalingo/go-scalingo/v4 Bumps [github.com/Scalingo/go-scalingo/v4](https://github.com/Scalingo/go-scalingo) from 4.13.1 to 4.14.0. - [Release notes](https://github.com/Scalingo/go-scalingo/releases) - [Changelog](https://github.com/Scalingo/go-scalingo/blob/master/CHANGELOG.md) - [Commits](https://github.com/Scalingo/go-scalingo/compare/v4.13.1...v4.14.0) --- updated-dependencies: - dependency-name: github.com/Scalingo/go-scalingo/v4 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- .../Scalingo/go-scalingo/v4/CHANGELOG.md | 8 ++++++++ .../github.com/Scalingo/go-scalingo/v4/README.md | 10 +++++----- .../github.com/Scalingo/go-scalingo/v4/addons.go | 15 +++++++++------ .../github.com/Scalingo/go-scalingo/v4/apps.go | 2 +- .../Scalingo/go-scalingo/v4/deployments.go | 16 +++++++++++++++- .../Scalingo/go-scalingo/v4/mocks_sig.json | 2 +- .../github.com/Scalingo/go-scalingo/v4/tokens.go | 9 +++++---- .../Scalingo/go-scalingo/v4/version.go | 2 +- vendor/modules.txt | 2 +- 11 files changed, 49 insertions(+), 23 deletions(-) diff --git a/go.mod b/go.mod index 7a5451052..b0729ea24 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.16 require ( github.com/ScaleFT/sshkeys v0.0.0-20200327173127-6142f742bca5 - github.com/Scalingo/go-scalingo/v4 v4.13.1 + github.com/Scalingo/go-scalingo/v4 v4.14.0 github.com/Scalingo/go-utils/errors v1.0.0 github.com/Scalingo/go-utils/retry v1.0.0 github.com/andrew-d/go-termutil v0.0.0-20150726205930-009166a695a2 diff --git a/go.sum b/go.sum index a6ef6487a..3bd2494a0 100644 --- a/go.sum +++ b/go.sum @@ -9,8 +9,8 @@ github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 h1:YoJbenK9C6 github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= github.com/ScaleFT/sshkeys v0.0.0-20200327173127-6142f742bca5 h1:VauE2GcJNZFun2Och6tIT2zJZK1v6jxALQDA9BIji/E= github.com/ScaleFT/sshkeys v0.0.0-20200327173127-6142f742bca5/go.mod h1:gxOHeajFfvGQh/fxlC8oOKBe23xnnJTif00IFFbiT+o= -github.com/Scalingo/go-scalingo/v4 v4.13.1 h1:UUkRZ8WMT9t6BO3diZpxXQy7diLALsU03G3FNvQSyu4= -github.com/Scalingo/go-scalingo/v4 v4.13.1/go.mod h1:Ko0alIlXes6cbY9Vj7W3hmhWLAnyrbPeeGFHBEZXmW4= +github.com/Scalingo/go-scalingo/v4 v4.14.0 h1:klWRZR3wlxAzsfcOOhe2Zc2R+QDWXzUgRne11odtlr8= +github.com/Scalingo/go-scalingo/v4 v4.14.0/go.mod h1:Ko0alIlXes6cbY9Vj7W3hmhWLAnyrbPeeGFHBEZXmW4= github.com/Scalingo/go-utils/errors v1.0.0 h1:9+1zBmT+d0kpAReChheUDX0AmT0/OtrDtHdwRymRufA= github.com/Scalingo/go-utils/errors v1.0.0/go.mod h1:X1v0A4DBs4exBWGjYsGLo6nsC49vqf2hEVtigTRv7iY= github.com/Scalingo/go-utils/retry v1.0.0 h1:aGT9Voe4rVEzn0bZ68x+nyBvk2sJWrzLP37+tTVdCuc= diff --git a/vendor/github.com/Scalingo/go-scalingo/v4/CHANGELOG.md b/vendor/github.com/Scalingo/go-scalingo/v4/CHANGELOG.md index faa43642e..fce88d626 100644 --- a/vendor/github.com/Scalingo/go-scalingo/v4/CHANGELOG.md +++ b/vendor/github.com/Scalingo/go-scalingo/v4/CHANGELOG.md @@ -2,6 +2,14 @@ ## To Be Released +## 4.14.0 + +* fix(apps): typo on the `UpdatedAt` field of the Apps [#220](https://github.com/Scalingo/go-scalingo/pull/220) +* fix(token): correctly deserialize the `ID` [#222](https://github.com/Scalingo/go-scalingo/pull/222) +* feat(token): add the `LastUsedAt` field [#222](https://github.com/Scalingo/go-scalingo/pull/222) +* feat(deployments): add the `DeploymentListWithPagination` method [#221](https://github.com/Scalingo/go-scalingo/pull/221) +* feat(addon): add the `ProvisionedAt` and `DeprovisionedAt` fields [#224](https://github.com/Scalingo/go-scalingo/pull/224) + ## 4.13.1 * build(deps): bump github.com/golang/mock from 1.5.0 to 1.6.0 diff --git a/vendor/github.com/Scalingo/go-scalingo/v4/README.md b/vendor/github.com/Scalingo/go-scalingo/v4/README.md index e89e3b21b..854e1a77c 100644 --- a/vendor/github.com/Scalingo/go-scalingo/v4/README.md +++ b/vendor/github.com/Scalingo/go-scalingo/v4/README.md @@ -1,6 +1,6 @@ [ ![Codeship Status for Scalingo/go-scalingo](https://app.codeship.com/projects/cf518dc0-0034-0136-d6b3-5a0245e77f67/status?branch=master)](https://app.codeship.com/projects/279805) -# Go client for Scalingo API v4.13.1 +# Go client for Scalingo API v4.14.0 This repository is the Go client for the [Scalingo APIs](https://developers.scalingo.com/). @@ -78,10 +78,10 @@ Commit, tag and create a new release: ```sh git add CHANGELOG.md README.md version.go -git commit -m "Bump v4.13.1" -git tag v4.13.1 -git push origin master v4.13.1 -hub release create v4.13.1 +git commit -m "Bump v4.14.0" +git tag v4.14.0 +git push origin master v4.14.0 +hub release create v4.14.0 ``` The title of the release should be the version number and the text of the diff --git a/vendor/github.com/Scalingo/go-scalingo/v4/addons.go b/vendor/github.com/Scalingo/go-scalingo/v4/addons.go index 3c84eb9c9..036e2759c 100644 --- a/vendor/github.com/Scalingo/go-scalingo/v4/addons.go +++ b/vendor/github.com/Scalingo/go-scalingo/v4/addons.go @@ -2,6 +2,7 @@ package scalingo import ( "encoding/json" + "time" "github.com/Scalingo/go-scalingo/v4/http" @@ -28,12 +29,14 @@ const ( ) type Addon struct { - ID string `json:"id"` - AppID string `json:"app_id"` - ResourceID string `json:"resource_id"` - Status AddonStatus `json:"status"` - Plan *Plan `json:"plan"` - AddonProvider *AddonProvider `json:"addon_provider"` + ID string `json:"id"` + AppID string `json:"app_id"` + ResourceID string `json:"resource_id"` + Status AddonStatus `json:"status"` + Plan *Plan `json:"plan"` + AddonProvider *AddonProvider `json:"addon_provider"` + ProvisionedAt time.Time `json:"provisioned_at"` + DeprovisionedAt time.Time `json:"deprovisioned_at"` } type AddonsRes struct { diff --git a/vendor/github.com/Scalingo/go-scalingo/v4/apps.go b/vendor/github.com/Scalingo/go-scalingo/v4/apps.go index 018fed2a2..c6599003a 100644 --- a/vendor/github.com/Scalingo/go-scalingo/v4/apps.go +++ b/vendor/github.com/Scalingo/go-scalingo/v4/apps.go @@ -108,7 +108,7 @@ type App struct { LastDeployedAt *time.Time `json:"last_deployed_at"` LastDeployedBy string `json:"last_deployed_by"` CreatedAt *time.Time `json:"created_at"` - UpdatedAt *time.Time `json:"update_at"` + UpdatedAt *time.Time `json:"updated_at"` Links *AppLinks `json:"links"` StackID string `json:"stack_id"` StickySession bool `json:"sticky_session"` diff --git a/vendor/github.com/Scalingo/go-scalingo/v4/deployments.go b/vendor/github.com/Scalingo/go-scalingo/v4/deployments.go index cd7d7ea31..35e911ef9 100644 --- a/vendor/github.com/Scalingo/go-scalingo/v4/deployments.go +++ b/vendor/github.com/Scalingo/go-scalingo/v4/deployments.go @@ -13,6 +13,7 @@ import ( type DeploymentsService interface { DeploymentList(app string) ([]*Deployment, error) + DeploymentListWithPagination(app string, opts PaginationOpts) ([]*Deployment, PaginationMeta, error) Deployment(app string, deploy string) (*Deployment, error) DeploymentLogs(deployURL string) (*http.Response, error) DeploymentStream(deployURL string) (*websocket.Conn, error) @@ -113,6 +114,9 @@ func IsFinishedString(status DeploymentStatus) bool { type DeploymentList struct { Deployments []*Deployment `json:"deployments"` + Meta struct { + PaginationMeta PaginationMeta `json:"pagination"` + } } type DeploymentLinks struct { @@ -135,12 +139,22 @@ func (c *Client) DeploymentList(app string) ([]*Deployment, error) { } err := c.ScalingoAPI().DoRequest(req, &deployments) if err != nil { - return []*Deployment{}, errgo.Mask(err, errgo.Any) + return []*Deployment{}, errgo.Notef(err, "fail to list the deployments") } return deployments.Deployments, nil } +func (c *Client) DeploymentListWithPagination(app string, opts PaginationOpts) ([]*Deployment, PaginationMeta, error) { + var deployments DeploymentList + err := c.ScalingoAPI().SubresourceList("apps", app, "deployments", opts.ToMap(), &deployments) + if err != nil { + return []*Deployment{}, PaginationMeta{}, errgo.Notef(err, "fail to list the deployments with pagination") + } + + return deployments.Deployments, deployments.Meta.PaginationMeta, nil +} + func (c *Client) Deployment(app string, deploy string) (*Deployment, error) { var deploymentMap map[string]*Deployment req := &httpclient.APIRequest{ diff --git a/vendor/github.com/Scalingo/go-scalingo/v4/mocks_sig.json b/vendor/github.com/Scalingo/go-scalingo/v4/mocks_sig.json index 0a1b4d8de..993e7080f 100644 --- a/vendor/github.com/Scalingo/go-scalingo/v4/mocks_sig.json +++ b/vendor/github.com/Scalingo/go-scalingo/v4/mocks_sig.json @@ -9,7 +9,7 @@ "github.com/Scalingo/go-scalingo.CollaboratorsService": "f7 7e 83 62 5b 67 9c 6c aa 79 f5 94 c7 90 d8 3f f8 42 95 81", "github.com/Scalingo/go-scalingo.ContainersService": "99 3d 27 af 4a bb b2 96 d9 7a e9 1a 40 6b eb 66 bb 9b 72 03", "github.com/Scalingo/go-scalingo.CronTasksService": "fa a6 29 83 98 5e 10 22 8c 87 3f fb 91 35 cd fb f2 8b 89 de", - "github.com/Scalingo/go-scalingo.DeploymentsService": "ed 32 bd b6 2f 86 a6 10 a8 67 40 f5 94 02 dd ff 0b 3e cb a9", + "github.com/Scalingo/go-scalingo.DeploymentsService": "e3 3d 3b 12 fd 76 aa ac 2c 6b c4 75 bb 04 ee 11 cd 44 1f 48", "github.com/Scalingo/go-scalingo.DomainsService": "5b 41 a1 fb 96 6d 8b e9 2a 02 25 04 64 75 ca 23 45 ab ac da", "github.com/Scalingo/go-scalingo.EventsService": "61 1a ac 54 41 28 f4 7b 66 09 e1 fd 35 79 29 70 f2 a6 5a 61", "github.com/Scalingo/go-scalingo.KeysService": "0c 8e c5 b3 f6 66 f0 f2 77 00 69 1e a5 a5 df 25 d7 2e 70 37", diff --git a/vendor/github.com/Scalingo/go-scalingo/v4/tokens.go b/vendor/github.com/Scalingo/go-scalingo/v4/tokens.go index 7cec98eea..7ca86eac2 100644 --- a/vendor/github.com/Scalingo/go-scalingo/v4/tokens.go +++ b/vendor/github.com/Scalingo/go-scalingo/v4/tokens.go @@ -34,10 +34,11 @@ func IsOTPRequired(err error) bool { } type Token struct { - ID int `json:"int"` - Name string `json:"name"` - CreatedAt time.Time `json:"created_at"` - Token string `json:"token"` + ID string `json:"id"` + Name string `json:"name"` + CreatedAt time.Time `json:"created_at"` + LastUsedAt time.Time `json:"last_used_at"` + Token string `json:"token"` } type LoginParams struct { diff --git a/vendor/github.com/Scalingo/go-scalingo/v4/version.go b/vendor/github.com/Scalingo/go-scalingo/v4/version.go index 2e61347a2..9ef0c62d5 100644 --- a/vendor/github.com/Scalingo/go-scalingo/v4/version.go +++ b/vendor/github.com/Scalingo/go-scalingo/v4/version.go @@ -1,3 +1,3 @@ package scalingo -var Version = "4.13.1" +var Version = "4.14.0" diff --git a/vendor/modules.txt b/vendor/modules.txt index 0006c06ad..8e870ae3d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -21,7 +21,7 @@ github.com/ProtonMail/go-crypto/openpgp/s2k # github.com/ScaleFT/sshkeys v0.0.0-20200327173127-6142f742bca5 ## explicit github.com/ScaleFT/sshkeys -# github.com/Scalingo/go-scalingo/v4 v4.13.1 +# github.com/Scalingo/go-scalingo/v4 v4.14.0 ## explicit github.com/Scalingo/go-scalingo/v4 github.com/Scalingo/go-scalingo/v4/billing From ad34053119113e31fc72725d45ecec7d79efd7c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Michon?= Date: Tue, 7 Sep 2021 11:20:33 +0200 Subject: [PATCH 2/2] docs(changelog): add Dependabot missing entry --- CHANGELOG.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c7b04ce4..d6dc3414e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,15 +2,16 @@ ### To be Released +* fix(backup-download): Now download the last successful backup [#663](https://github.com/Scalingo/cli/pull/663) +* fix(review-app-url): add app url in the tablewriter [#664](https://github.com/Scalingo/cli/pull/664) +* fix(backups-download): print error on stderr if the backup status is not 'done' [#665](https://github.com/Scalingo/cli/pull/665) +* feat(command): add command `cron-tasks` to list cron tasks of an application [#670](https://github.com/Scalingo/cli/pull/670) +* fix(run): allow an equals sign (=) in environment variable values [#674](https://github.com/Scalingo/cli/pull/674) * bump github.com/fatih/color from 1.11.0 to 1.12.0: add support for `NO_COLOR` environment variable. -* fix(backup-download) Now download the last successful backup [#663](https://github.com/Scalingo/cli/pull/663) -* fix(review-app-url) add app url in the tablewriter [#664](https://github.com/Scalingo/cli/pull/664) -* fix(backups-download) print error on stderr if the backup status is not 'done' [#665](https://github.com/Scalingo/cli/pull/665) * update go version to 1.16 and replace ioutil by io/os [#666](https://github.com/Scalingo/cli/pull/666) * bump github.com/briandowns/spinner from 1.12.0 to 1.16.0 * bump github.com/go-git/go-git/v5 from 5.4.1 to 5.4.2 -* feat(command): add command `cron-tasks` to list cron tasks of an application [#670](https://github.com/Scalingo/cli/pull/670) -* fix(run) allow an equals sign (=) in environment variable values [#674](https://github.com/Scalingo/cli/pull/674) +* bump github.com/Scalingo/go-scalingo/v4 from 4.13.1 to 4.14.0 ### 1.20.2