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

Commit cbae1a3

Browse files
authored
Merge pull request #23 from afrisalyp/issue-220
Remove email services.
2 parents db3a02c + 7abdeb9 commit cbae1a3

File tree

6 files changed

+2
-88
lines changed

6 files changed

+2
-88
lines changed

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ The following config parameters are supported, they are defined in `config/defau
3232
|TC_DEV_ENV| the flag whether to use topcoder development api or production| false|
3333
| NEW_CHALLENGE_TEMPLATE | the body template for new challenge request. You can change the subTrack, reviewTypes, technologies, .. here | see `default.js` |
3434
| NEW_CHALLENGE_DURATION_IN_DAYS | the duration of new challenge | 5 |
35-
| NODE_MAILER_OPTIONS| the node mailer smtp options, see [here](https://nodemailer.com/smtp/ for more detail)| see `default.js` |
36-
|EMAIL_SENDER_ADDRESS| the email sender email address||
37-
|ISSUE_BID_EMAIL_RECEIVER| the email receiver about bid email||
3835
|TC_URL| the base URL of topcoder to get the challenge URL| defaults to `https://www.topcoder-dev.com`|
3936
|GITLAB_API_BASE_URL| the URL for gitlab host| defaults to `https://gitlab.com`|
4037
|PAID_ISSUE_LABEL|the label name for paid, should be one of the label configured in topcoder x ui|'tcx_Paid'|

config/default.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,6 @@ module.exports = {
5353
// NOTE: if subTrack is FIRST_2_FINISH,
5454
// this config has no effect since the ***EndsAt will be set automatically by TC APIs
5555
NEW_CHALLENGE_DURATION_IN_DAYS: process.env.NEW_CHALLENGE_DURATION_IN_DAYS || 5,
56-
// node mailer option
57-
NODE_MAILER_OPTIONS: {
58-
host: process.env.SMTP_HOST || process.env.MAILGUN_SMTP_SERVER || 'smtp.gmail.com',
59-
port: process.env.SMTP_PORT || process.env.MAILGUN_SMTP_POR || 465,
60-
secure: process.env.SMTP_IS_SECURE || true,
61-
auth: {
62-
user: process.env.SMTP_USERNAME || process.env.MAILGUN_SMTP_LOGIN || '',
63-
pass: process.env.SMTP_PASSWORD || process.env.MAILGUN_SMTP_PASSWORD || ''
64-
}
65-
},
66-
EMAIL_SENDER_ADDRESS: process.env.EMAIL_SENDER_ADDRESS || '',
67-
ISSUE_BID_EMAIL_RECEIVER: process.env.ISSUE_BID_EMAIL_RECEIVER || '',
6856
TC_URL: process.env.TC_URL || 'https://www.topcoder-dev.com',
6957
GITLAB_API_BASE_URL: process.env.GITLAB_API_BASE_URL || 'https://gitlab.com',
7058
PAID_ISSUE_LABEL: process.env.PAID_ISSUE_LABEL || 'tcx_Paid',

configuration.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ The following config parameters are supported, they are defined in `config/defau
1414
|TC_DEV_ENV| the flag whether to use topcoder development api or production| false|
1515
| NEW_CHALLENGE_TEMPLATE | the body template for new challenge request. You can change the subTrack, reviewTypes, technologies, .. here | see `default.js` |
1616
| NEW_CHALLENGE_DURATION_IN_DAYS | the duration of new challenge | 5 |
17-
| NODE_MAILER_OPTIONS| the node mailer smtp options, see [here](https://nodemailer.com/smtp/ for more detail)| see `default.js` |
18-
|EMAIL_SENDER_ADDRESS| the email sender email address||
19-
|ISSUE_BID_EMAIL_RECEIVER| the email receiver about bid email||
2017
|TC_URL| the base URL of topcoder to get the challenge URL| defaults to `https://www.topcoder-dev.com`|
2118
|GITLAB_API_BASE_URL| the URL for gitlab host| defaults to `https://gitlab.com`|
2219
|PAID_ISSUE_LABEL|the label name for paid, should be one of the label configured in topcoder x ui|'tcx_Paid'|

services/EmailService.js

Lines changed: 0 additions & 66 deletions
This file was deleted.

services/EventService.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
const config = require('config');
1212
const _ = require('lodash');
1313
const logger = require('../utils/logger');
14-
const gitHubService = require('./GithubService');
15-
const gitlabService = require('./GitlabService');
1614
const models = require('../models');
1715
const dbHelper = require('../utils/db-helper');
16+
const gitHubService = require('./GithubService');
17+
const gitlabService = require('./GitlabService');
1818

1919
const timeoutMapper = {};
2020

services/IssueService.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const models = require('../models');
2121
const dbHelper = require('../utils/db-helper');
2222
const helper = require('../utils/helper');
2323
const gitHelper = require('../utils/git-helper');
24-
const emailService = require('./EmailService');
2524
const userService = require('./UserService');
2625
const eventService = require('./EventService');
2726

@@ -269,7 +268,6 @@ async function handleIssueComment(event, issue) {
269268
const parsedComment = parseComment(event.data.comment);
270269
if (parsedComment.isBid) {
271270
logger.debug(`New bid is received with amount ${parsedComment.bidAmount}.`);
272-
await emailService.sendNewBidEmail(event.data, parsedComment.bidAmount);
273271
}
274272
if (parsedComment.isAcceptBid) {
275273
logger.debug(`Bid by ${parsedComment.assignedUser} is accepted with amount ${parsedComment.bidAmount} `);

0 commit comments

Comments
 (0)