mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 15:48:11 -05:00
Redirect artisan events to artisans slack channel instead of dev-feed
This commit is contained in:
parent
de567c6570
commit
20b3102baa
4 changed files with 4 additions and 7 deletions
|
@ -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({})
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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 []
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue