@@ -16,6 +16,13 @@ const projectTypes = {
16
16
visual_prototype : 'Design & Prototype' ,
17
17
visual_design : 'Design' ,
18
18
} ;
19
+ const icons = {
20
+ slack : {
21
+ CoderBotIcon : 'https://emoji.slack-edge.com/T03R80JP7/coder-the-bot/85ae574c0c7063ef.png' ,
22
+ CoderErrorIcon : 'https://emoji.slack-edge.com/T03R80JP7/coder-error/cd2633216e7fd385.png' ,
23
+ CoderGrinningIcon : 'https://emoji.slack-edge.com/T03R80JP7/coder-grinning/a3b7f3fe9e838377.png' ,
24
+ } ,
25
+ } ;
19
26
module . exports = {
20
27
// The event types to be consumed from the source RabbitMQ
21
28
events : {
@@ -59,7 +66,7 @@ module.exports = {
59
66
} ,
60
67
projectUnclaimed : ( data ) => {
61
68
return {
62
- icon_url : 'https://emoji .slack-edge.com/T03R80JP7/coder-the-bot/85ae574c0c7063ef.png' ,
69
+ icon_url : icons . slack . CoderBotIcon ,
63
70
channel : `${ config . get ( 'SLACK_CHANNEL_COPILOTS' ) } ` ,
64
71
pretext : 'A project has been reviewed and needs a copilot. Please check it out and claim it.' ,
65
72
fallback : 'A project has been reviewed and needs a copilot. Please check it out and claim it.' ,
@@ -78,7 +85,7 @@ module.exports = {
78
85
} ,
79
86
projectUnclaimedReposted : ( data ) => {
80
87
return {
81
- icon_url : 'https://emoji .slack-edge.com/T03R80JP7/coder-error/cd2633216e7fd385.png' ,
88
+ icon_url : icons . slack . CoderErrorIcon ,
82
89
channel : `${ config . get ( 'SLACK_CHANNEL_COPILOTS' ) } ` ,
83
90
pretext : 'We\'re still looking for a copilot for a reviewed project. Please check it out and claim it.' ,
84
91
fallback : 'We\'re still looking for a copilot for a reviewed project. Please check it out and claim it.' ,
@@ -97,7 +104,7 @@ module.exports = {
97
104
} ,
98
105
projectClaimed : ( data ) => {
99
106
return {
100
- icon_url : 'https://emoji .slack-edge.com/T03R80JP7/coder-grinning/a3b7f3fe9e838377.png' ,
107
+ icon_url : icons . slack . CoderGrinningIcon ,
101
108
channel : `${ config . get ( 'SLACK_CHANNEL_COPILOTS' ) } ` ,
102
109
pretext : `${ data . firstName } ${ data . lastName } has claimed a project. Welcome to the team!` ,
103
110
fallback : `${ data . firstName } ${ data . lastName } has claimed a project. Welcome to the team!` ,
@@ -193,10 +200,11 @@ module.exports = {
193
200
canceled : 'cancelled' , // spelling is not a type :)
194
201
completed : 'completed' ,
195
202
} ,
196
- projectTypes,
197
203
memberRoles : {
198
204
manager : 'manager' ,
199
205
customer : 'customer' ,
200
206
copilot : 'copilot' ,
201
207
} ,
208
+ projectTypes,
209
+ icons,
202
210
} ;
0 commit comments