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

Commit 585e68d

Browse files
committed
Updates for September release assembly
1 parent 1d59922 commit 585e68d

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
"homepage": "https://gitlab.com/luettich/processor#README",
2626
"dependencies": {
27-
"axios": "^0.16.2",
27+
"axios": "^0.19.0",
2828
"circular-json": "^0.5.7",
2929
"config": "^1.30.0",
3030
"dynamoose": "^1.1.0",
@@ -34,7 +34,7 @@
3434
"global-request-logger": "^0.1.1",
3535
"joi": "^13.4.0",
3636
"jwt-decode": "^2.2.0",
37-
"lodash": "^4.17.10",
37+
"lodash": "^4.17.15",
3838
"markdown-it": "^8.4.1",
3939
"moment": "^2.22.2",
4040
"no-kafka": "^3.2.10",

services/IssueService.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,10 @@ async function handleIssueClose(event, issue) {
477477
* handles the issue create event
478478
* @param {Object} event the event
479479
* @param {Object} issue the issue
480+
* @param {Boolean} recreate indicate that the process is to recreate an issue
480481
* @private
481482
*/
482-
async function handleIssueCreate(event, issue) {
483+
async function handleIssueCreate(event, issue, recreate = false) {
483484
// check if project for such repository is already created
484485
const project = await getProjectDetail(event);
485486

@@ -550,14 +551,15 @@ async function handleIssueCreate(event, issue) {
550551
const comment = `Contest ${contestUrl} has been created for this ticket.`;
551552
await gitHelper.createComment(event, issue.number, comment);
552553

553-
// if assignee is added during issue create then assign as well
554-
if (event.data.issue.assignees && event.data.issue.assignees.length > 0 && event.data.issue.assignees[0].id) {
555-
event.data.assignee = {
556-
id: event.data.issue.assignees[0].id
557-
};
558-
await handleIssueAssignment(event, issue, true);
554+
if (event.provider === 'gitlab' || recreate) {
555+
// if assignee is added during issue create then assign as well
556+
if (event.data.issue.assignees && event.data.issue.assignees.length > 0 && event.data.issue.assignees[0].id) {
557+
event.data.assignee = {
558+
id: event.data.issue.assignees[0].id
559+
};
560+
await handleIssueAssignment(event, issue, true);
561+
}
559562
}
560-
561563
logger.debug(`new challenge created with id ${issue.challengeId} for issue ${issue.number}`);
562564
}
563565

@@ -700,7 +702,7 @@ async function handleIssueRecreate(event, issue) {
700702
logger.error(`Error cleaning the old DB and its challenge.\n ${err}`);
701703
}
702704

703-
await handleIssueCreate(event, issue);
705+
await handleIssueCreate(event, issue, true);
704706
// handleIssueLabelUpdated(event, issue);
705707
}
706708

utils/topcoder-api-helper.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@ async function createChallenge(challenge) {
122122
Status Code:${statusCode}, Response: ${circularJSON.stringify(challengeResponse.result)}`);
123123
return _.get(challengeResponse, 'result.content.id');
124124
} catch (err) {
125-
console.log(err);
126-
127125
loggerFile.info(`EndPoint: POST /challenges, POST parameters: ${circularJSON.stringify(challengeBody)}, Status Code:null,
128126
Error: 'Failed to create challenge.', Details: ${circularJSON.stringify(err)}`);
129127
throw errors.convertTopcoderApiError(err, 'Failed to create challenge.');

0 commit comments

Comments
 (0)