Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Pass a deployment comment to the deployment form #17

Merged
merged 1 commit into from

2 participants

@tomfotherby

I made a tiny change to scratch a itch I mentioned in the webistrano issue tracker: https://github.com/peritor/webistrano/issues/#issue/12

In order to be able to pass a deployment comment to the deployment form, add the following ruby code after line 33 of /var/www/webistrano/app/controllers/deployments_controller.rb:

# Allow description url var to be passed in the URL
@deployment.description = params[:description]

Now the description url variable can be used to pre-fill the deployment comment, e.g. http://webistrano.example.com:8000/projects/1/stages/1/deployments/new?task=deploy&description=my%20comment. We do this to get some integration with the trac bug tracking software.

@jweiss jweiss merged commit e6f9c8f into peritor:master
@jweiss jweiss referenced this pull request from a commit
@jweiss jweiss add test for pull request #17 beb2b4a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 0 deletions.
  1. +3 −0  app/controllers/deployments_controller.rb
View
3  app/controllers/deployments_controller.rb
@@ -31,6 +31,9 @@ def show
def new
@deployment = @stage.deployments.new
@deployment.task = params[:task]
+
+ # Allow description to be passed in via a URL parameter
+ @deployment.description = params[:description]
if params[:repeat]
@original = @stage.deployments.find(params[:repeat])
Something went wrong with that request. Please try again.