heroku / platform-api

Ruby HTTP client for the Heroku API
MIT License
214 stars 85 forks source link

How to use rollback properly? #113

Closed knagode closed 3 years ago

knagode commented 3 years ago

I am trying to use rollback but I can not find a way to do this.

I retrieve releases with:

recent_releases = heroku.release.list('app-stg').to_a.last(7).reverse

I am trying to rollback with:

heroku.release.rollback('app-stg', payload = "v#{recent_releases[2]["version"]}")

However this doesn't work - it seems like API works a bit differently than Heroku CLI .. What should I put into payload to rollback to specific version?

knagode commented 3 years ago
heroku.release.rollback('app-stg', {"release" => release[?]['id']})

This worked!