Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit cc5ddeb

Browse files
committed
add slack icons to constants
1 parent 7593ab2 commit cc5ddeb

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/common/constants.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ const projectTypes = {
1616
visual_prototype: 'Design & Prototype',
1717
visual_design: 'Design',
1818
};
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+
};
1926
module.exports = {
2027
// The event types to be consumed from the source RabbitMQ
2128
events: {
@@ -59,7 +66,7 @@ module.exports = {
5966
},
6067
projectUnclaimed: (data) => {
6168
return {
62-
icon_url: 'https://emoji.slack-edge.com/T03R80JP7/coder-the-bot/85ae574c0c7063ef.png',
69+
icon_url: icons.slack.CoderBotIcon,
6370
channel: `${config.get('SLACK_CHANNEL_COPILOTS')}`,
6471
pretext: 'A project has been reviewed and needs a copilot. Please check it out and claim it.',
6572
fallback: 'A project has been reviewed and needs a copilot. Please check it out and claim it.',
@@ -78,7 +85,7 @@ module.exports = {
7885
},
7986
projectUnclaimedReposted: (data) => {
8087
return {
81-
icon_url: 'https://emoji.slack-edge.com/T03R80JP7/coder-error/cd2633216e7fd385.png',
88+
icon_url: icons.slack.CoderErrorIcon,
8289
channel: `${config.get('SLACK_CHANNEL_COPILOTS')}`,
8390
pretext: 'We\'re still looking for a copilot for a reviewed project. Please check it out and claim it.',
8491
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 = {
97104
},
98105
projectClaimed: (data) => {
99106
return {
100-
icon_url: 'https://emoji.slack-edge.com/T03R80JP7/coder-grinning/a3b7f3fe9e838377.png',
107+
icon_url: icons.slack.CoderGrinningIcon,
101108
channel: `${config.get('SLACK_CHANNEL_COPILOTS')}`,
102109
pretext: `${data.firstName} ${data.lastName} has claimed a project. Welcome to the team!`,
103110
fallback: `${data.firstName} ${data.lastName} has claimed a project. Welcome to the team!`,
@@ -193,10 +200,11 @@ module.exports = {
193200
canceled: 'cancelled', // spelling is not a type :)
194201
completed: 'completed',
195202
},
196-
projectTypes,
197203
memberRoles: {
198204
manager: 'manager',
199205
customer: 'customer',
200206
copilot: 'copilot',
201207
},
208+
projectTypes,
209+
icons,
202210
};

0 commit comments

Comments
 (0)