Redirect artisan events to artisans slack channel instead of dev-feed

This commit is contained in:
Scott Erickson 2016-06-27 09:49:07 -07:00
parent de567c6570
commit 20b3102baa
4 changed files with 4 additions and 7 deletions

View file

@ -481,8 +481,7 @@ module.exports = class Handler
sendChangedSlackMessage: (options) ->
message = "#{options.creator.get('name')} saved a change to #{options.target.get('name')}: #{options.target.get('commitMessage') or '(no commit message)'} #{options.docLink}"
rooms = if /Diplomat submission/.test(message) then ['dev-feed'] else ['dev-feed', 'artisans']
slack.sendSlackMessage message, rooms
slack.sendSlackMessage message, ['artisans']
makeNewInstance: (req) ->
model = new @modelClass({})

View file

@ -113,6 +113,6 @@ PatchHandler = class PatchHandler extends Handler
sendPatchCreatedSlackMessage: (options) ->
message = "#{options.creator.get('name')} submitted a patch to #{options.target.get('name')}: #{options.patch.get('commitMessage')} #{options.docLink}"
slack.sendSlackMessage message, ['dev-feed']
slack.sendSlackMessage message, ['artisans']
module.exports = new PatchHandler()

View file

@ -96,8 +96,7 @@ module.exports =
# Post a message on Slack
message = "#{req.user.get('name')} saved a change to #{doc.get('name')}: #{doc.get('commitMessage') or '(no commit message)'} #{docLink}"
rooms = if /Diplomat submission/.test(message) then ['dev-feed'] else ['dev-feed']
slack.sendSlackMessage message, rooms
slack.sendSlackMessage message, ['artisans']
# Send emails to watchers
watchers = doc.get('watchers') or []

View file

@ -8,8 +8,7 @@ roomChannelMap =
module.exports.sendChangedSlackMessage = (options) ->
message = "#{options.creator.get('name')} saved a change to #{options.target.get('name')}: #{options.target.get('commitMessage') or '(no commit message)'} #{options.docLink}"
rooms = if /Diplomat submission/.test(message) then ['dev-feed'] else ['artisans']
@sendSlackMessage message, rooms
@sendSlackMessage message, ['artisans']
module.exports.sendSlackMessage = (message, rooms=['tower'], options={}) ->
unless config.isProduction