supremegolf/slackistrano — pull request #4 by LouieGeetoo (2014-06-18 16:14:35+00:00)
Title: Run slack:deploy:starting after deploy:starting instead of before

so that variables set during the starting phase with `ask` calls can be included in the starting message.

We needed this since some of our stages use `ask :branch` to get the git branch that should be deployed, which we wanted to be included in the deploy starting message in Slack. Without this change, trying to `fetch :branch` in the starting message would result in text like `#Proc:0x007f33427b0670@config/deploy/staging.rb:15>` (while it would appear fine in the finished and failure messages, since the branch had been provided by that point).

Despite the slight delay in when the starting message appears, I think this change is actually the desirable default behavior, since you probably don't want to broadcast a deploy is starting until any necessary variables have been `ask`ed for. An alternative could be to make it an option, which I didn't tackle here.