phallstrom / slackistrano

Slack integration for Capistrano deployments.
MIT License
373 stars 74 forks source link

Support for multiple workbook URLs #91

Open Abhichede opened 5 years ago

Abhichede commented 5 years ago

slackistrano currently accepts a hash as below

set :slackistrano, {
  klass: Slackistrano::CustomMessaging,
  channel: '#channel',
  webhook: 'https://webhook-url
}

I have a need where I want to get notifications of deployments on two different slack workspaces. I could write a rake task to notify other workspace and use it in cap deploy.
What if we add a feature to support array of such configs as mentioned below:

set :slackistrano, [{
  klass: Slackistrano::CustomMessaging,
  channel: '#channel1',
  webhook: 'https://webhook-url1
},
{
  klass: Slackistrano::CustomMessaging,
  channel: '#channel2',
  webhook: 'https://webhook-url2
}]

would be great if this feature supports array of configs or single Hash as a config.

phallstrom commented 5 years ago

@Abhichede Curious to know more about your use case. No good reason other than I'm simply curious about why you need it to post to multiple workspaces...

Abhichede commented 5 years ago

@Abhichede Curious to know more about your use case. No good reason other than I'm simply curious about why you need it to post to multiple workspaces...

We have feature teams from different organisations, and the feature branches could be deployed to different environments. multiple teams needs to get the notifications on the deployment. That is the only reason we need more than one web hooks to be added in slackistrano.