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

Commit a2c55c7

Browse files
authored
Merge pull request #1 from veshu/develop
wip changes for #14,#13,#18
2 parents 5a21789 + 241e0e7 commit a2c55c7

15 files changed

+795
-445
lines changed

.eslintrc

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@
33
"node": true
44
},
55
"parserOptions": {
6-
"ecmaVersion": 8
6+
"ecmaVersion": 8,
7+
"ecmaFeatures": {
8+
"experimentalObjectRestSpread": true
9+
}
710
},
811
"extends": "eslint-config-topcoder/nodejs",
912
"rules": {
10-
"max-len": ["error", 160],
13+
"max-len": [
14+
"error",
15+
160
16+
],
1117
"indent": [
1218
"error",
1319
2
@@ -25,12 +31,16 @@
2531
"always"
2632
],
2733
"no-console": 0,
28-
"comma-dangle": ["error", {
29-
"arrays": "never",
30-
"objects": "never",
31-
"imports": "never",
32-
"exports": "never",
33-
"functions": "ignore"
34-
}]
34+
"comma-dangle": [
35+
"error",
36+
{
37+
"arrays": "never",
38+
"objects": "never",
39+
"imports": "never",
40+
"exports": "never",
41+
"functions": "ignore"
42+
}
43+
],
44+
"max-lines": 0,
3545
}
36-
}
46+
}

config/default.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,8 @@ module.exports = {
8282
GITLAB_API_BASE_URL: process.env.GITLAB_API_BASE_URL || 'https://gitlab.com',
8383
PAID_ISSUE_LABEL: process.env.PAID_ISSUE_LABEL || 'Paid',
8484
FIX_ACCEPTED_ISSUE_LABEL: process.env.FIX_ACCEPTED_ISSUE_LABEL || 'Fix accepted',
85-
TC_OR_DETAIL_LINK: process.env.TC_OR_DETAIL_LINK || 'https://software.topcoder-dev.com/review/actions/ViewProjectDetails?pid='
85+
READY_FOR_REVIEW_ISSUE_LABEL: process.env.READY_FOR_REVIEW_ISSUE_LABEL || 'Ready for review',
86+
TC_OR_DETAIL_LINK: process.env.TC_OR_DETAIL_LINK || 'https://software.topcoder-dev.com/review/actions/ViewProjectDetails?pid=',
87+
RETRY_COUNT: process.env.RETRY_COUNT || 3,
88+
RETRY_INTERVAL: process.env.RETRY_INTERVAL || 120000, // 2 minutes
8689
};

configuration.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ The following config parameters are supported, they are defined in `config/defau
2626
|PAID_ISSUE_LABEL|the label name for paid, should be one of the label configured in topcoder x ui|'Paid'|
2727
|FIX_ACCEPTED_ISSUE_LABEL|the label name for fix accepted, should be one of the label configured in topcoder x ui|'Fix Accepted'|
2828
|TC_OR_DETAIL_LINK|the link to online review detail of challenge| see `default.js`, OR link for dev environment|
29+
|RETRY_COUNT| the number of times an event should be retried to process| 3|
30+
|RETRY_INTERVAL| the interval at which the event should be retried to process in milliseconds | 120000|
31+
|READY_FOR_REVIEW_ISSUE_LABEL| the label name for ready for review, should be one of the label configured in topcoder x ui|'Ready for review'|
2932

3033
KAFKA_OPTIONS should be object as described in https://github.com/SOHU-Co/kafka-node#kafkaclient
3134
For using with SSL, the options should be as

constants.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ const USER_ROLES = {
2222
OWNER: 'owner'
2323
};
2424

25+
const SERVICE_ERROR_STATUS = 500;
26+
2527
module.exports = {
2628
USER_ROLES,
27-
USER_TYPES
29+
USER_TYPES,
30+
SERVICE_ERROR_STATUS
2831
};

0 commit comments

Comments
 (0)