webistrano icon indicating copy to clipboard operation
webistrano copied to clipboard

[Feature] Is it possible to pre-fill the deployment comment?

Open tomfotherby opened this issue 14 years ago • 2 comments

In order for me to deploy quickly, I have a browser bookmark to our Webistrano deployment page, e.g. http://www.example.com:8000/projects/1/stages/1/deployments/new?task=deploy

We use trac as a issue management system and I'd like to integrate the Webistrano deployment into trac using the deployment hyperlink above. It would be cool if I could pre-fill the deployment comment using data from the trac ticket. Is there any way I can do this? Does Webistrano have a API that could help?

tomfotherby avatar Sep 04 '10 11:09 tomfotherby

Yes, Webistrano has an API. It follows the default Rails RESTful API, e.g. /projects/1/stages.xml etc

But I think there is no API call to pre-fill HTML forms. You could easily fake it if you would add ?deployment[comment]=Foobar or so to the URL.

jweiss avatar Sep 21 '10 07:09 jweiss

Thanks, I was able to pass some comment text via the url using the "description" variable, e.g. http://www.example.com:8000/projects/1/stages/1/deployments/new?task=deploy&description=my%20comment

But first, I needed to add the following ruby code after line 33 of app/controllers/deployments_controller.rb:

@deployment.description = params[:description]

tomfotherby avatar Sep 21 '10 08:09 tomfotherby