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

Commit fd6c099

Browse files
author
Vikas Agarwal
committed
linting
1 parent 97abecf commit fd6c099

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/common/constants.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
const _ = require('lodash');
1111
const config = require('config');
1212

13-
const defaultColor = '#67c5ef'
13+
const defaultColor = '#67c5ef';
1414
const projectTypes = {
1515
app_dev: {
1616
label: 'Full App',
@@ -69,7 +69,7 @@ module.exports = {
6969
projectInReview: (data) => {
7070
const obj = {
7171
channel: `${config.get('SLACK_CHANNEL_MANAGERS')}`,
72-
color: _.get(projectTypes, data.project.type + '.color', defaultColor),
72+
color: _.get(projectTypes, `${data.project.type}.color`, defaultColor),
7373
pretext: 'A project is ready to be reviewed.',
7474
fallback: 'A project is ready to be reviewed.',
7575
title: _.get(data, 'project.name', ''),
@@ -98,7 +98,7 @@ module.exports = {
9898
projectUnclaimed: (data) => {
9999
const obj = {
100100
icon_url: icons.slack.CoderBotIcon,
101-
color: _.get(projectTypes, data.project.type + '.color', defaultColor),
101+
color: _.get(projectTypes, `${data.project.type}.color`, defaultColor),
102102
channel: `${config.get('SLACK_CHANNEL_COPILOTS')}`,
103103
pretext: 'A project has been reviewed and needs a copilot. Please check it out and claim it.',
104104
fallback: 'A project has been reviewed and needs a copilot. Please check it out and claim it.',
@@ -120,7 +120,7 @@ module.exports = {
120120
projectUnclaimedReposted: (data) => {
121121
const obj = {
122122
icon_url: icons.slack.CoderErrorIcon,
123-
color: _.get(projectTypes, data.project.type + '.color', defaultColor),
123+
color: _.get(projectTypes, `${data.project.type}.color`, defaultColor),
124124
channel: `${config.get('SLACK_CHANNEL_COPILOTS')}`,
125125
pretext: 'We\'re still looking for a copilot for a reviewed project. Please check it out and claim it.',
126126
fallback: 'We\'re still looking for a copilot for a reviewed project. Please check it out and claim it.',
@@ -142,7 +142,7 @@ module.exports = {
142142
projectClaimed: (data) => {
143143
const obj = {
144144
icon_url: icons.slack.CoderGrinningIcon,
145-
color: _.get(projectTypes, data.project.type + '.color', defaultColor),
145+
color: _.get(projectTypes, `${data.project.type}.color`, defaultColor),
146146
channel: `${config.get('SLACK_CHANNEL_COPILOTS')}`,
147147
pretext: `${data.firstName} ${data.lastName} has claimed a project. Welcome to the team!`,
148148
fallback: `${data.firstName} ${data.lastName} has claimed a project. Welcome to the team!`,

0 commit comments

Comments
 (0)