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

Remove email services. #23

Merged
merged 1 commit into from
Nov 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -32,9 +32,6 @@ The following config parameters are supported, they are defined in `config/defau
|TC_DEV_ENV| the flag whether to use topcoder development api or production| false|
| NEW_CHALLENGE_TEMPLATE | the body template for new challenge request. You can change the subTrack, reviewTypes, technologies, .. here | see `default.js` |
| NEW_CHALLENGE_DURATION_IN_DAYS | the duration of new challenge | 5 |
| NODE_MAILER_OPTIONS| the node mailer smtp options, see [here](https://nodemailer.com/smtp/ for more detail)| see `default.js` |
|EMAIL_SENDER_ADDRESS| the email sender email address||
|ISSUE_BID_EMAIL_RECEIVER| the email receiver about bid email||
|TC_URL| the base URL of topcoder to get the challenge URL| defaults to `https://www.topcoder-dev.com`|
|GITLAB_API_BASE_URL| the URL for gitlab host| defaults to `https://gitlab.com`|
|PAID_ISSUE_LABEL|the label name for paid, should be one of the label configured in topcoder x ui|'tcx_Paid'|
12 changes: 0 additions & 12 deletions config/default.js
Original file line number Diff line number Diff line change
@@ -53,18 +53,6 @@ module.exports = {
// NOTE: if subTrack is FIRST_2_FINISH,
// this config has no effect since the ***EndsAt will be set automatically by TC APIs
NEW_CHALLENGE_DURATION_IN_DAYS: process.env.NEW_CHALLENGE_DURATION_IN_DAYS || 5,
// node mailer option
NODE_MAILER_OPTIONS: {
host: process.env.SMTP_HOST || process.env.MAILGUN_SMTP_SERVER || 'smtp.gmail.com',
port: process.env.SMTP_PORT || process.env.MAILGUN_SMTP_POR || 465,
secure: process.env.SMTP_IS_SECURE || true,
auth: {
user: process.env.SMTP_USERNAME || process.env.MAILGUN_SMTP_LOGIN || '',
pass: process.env.SMTP_PASSWORD || process.env.MAILGUN_SMTP_PASSWORD || ''
}
},
EMAIL_SENDER_ADDRESS: process.env.EMAIL_SENDER_ADDRESS || '',
ISSUE_BID_EMAIL_RECEIVER: process.env.ISSUE_BID_EMAIL_RECEIVER || '',
TC_URL: process.env.TC_URL || 'https://www.topcoder-dev.com',
GITLAB_API_BASE_URL: process.env.GITLAB_API_BASE_URL || 'https://gitlab.com',
PAID_ISSUE_LABEL: process.env.PAID_ISSUE_LABEL || 'tcx_Paid',
3 changes: 0 additions & 3 deletions configuration.md
Original file line number Diff line number Diff line change
@@ -14,9 +14,6 @@ The following config parameters are supported, they are defined in `config/defau
|TC_DEV_ENV| the flag whether to use topcoder development api or production| false|
| NEW_CHALLENGE_TEMPLATE | the body template for new challenge request. You can change the subTrack, reviewTypes, technologies, .. here | see `default.js` |
| NEW_CHALLENGE_DURATION_IN_DAYS | the duration of new challenge | 5 |
| NODE_MAILER_OPTIONS| the node mailer smtp options, see [here](https://nodemailer.com/smtp/ for more detail)| see `default.js` |
|EMAIL_SENDER_ADDRESS| the email sender email address||
|ISSUE_BID_EMAIL_RECEIVER| the email receiver about bid email||
|TC_URL| the base URL of topcoder to get the challenge URL| defaults to `https://www.topcoder-dev.com`|
|GITLAB_API_BASE_URL| the URL for gitlab host| defaults to `https://gitlab.com`|
|PAID_ISSUE_LABEL|the label name for paid, should be one of the label configured in topcoder x ui|'tcx_Paid'|
66 changes: 0 additions & 66 deletions services/EmailService.js

This file was deleted.

4 changes: 2 additions & 2 deletions services/EventService.js
Original file line number Diff line number Diff line change
@@ -11,10 +11,10 @@
const config = require('config');
const _ = require('lodash');
const logger = require('../utils/logger');
const gitHubService = require('./GithubService');
const gitlabService = require('./GitlabService');
const models = require('../models');
const dbHelper = require('../utils/db-helper');
const gitHubService = require('./GithubService');
const gitlabService = require('./GitlabService');

const timeoutMapper = {};

2 changes: 0 additions & 2 deletions services/IssueService.js
Original file line number Diff line number Diff line change
@@ -21,7 +21,6 @@ const models = require('../models');
const dbHelper = require('../utils/db-helper');
const helper = require('../utils/helper');
const gitHelper = require('../utils/git-helper');
const emailService = require('./EmailService');
const userService = require('./UserService');
const eventService = require('./EventService');

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