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

Commit a06dfac

Browse files
committed
Copilot fixes - challenge 30069830
1 parent ba019f0 commit a06dfac

16 files changed

+858
-690
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ The following config parameters are supported, they are defined in `config/defau
4141
|ISSUE_BID_EMAIL_RECEIVER| the email receiver about bid email||
4242
|TC_URL| the base URL of topcoder to get the challenge URL| defaults to `https://www.topcoder-dev.com`|
4343
|GITLAB_API_BASE_URL| the URL for gitlab host| defaults to `https://gitlab.com`|
44-
|PAID_ISSUE_LABEL|the label name for paid, should be one of the label configured in topcoder x ui|'Paid'|
45-
|FIX_ACCEPTED_ISSUE_LABEL|the label name for fix accepted, should be one of the label configured in topcoder x ui|'Fix Accepted'|
44+
|PAID_ISSUE_LABEL|the label name for paid, should be one of the label configured in topcoder x ui|'tcx_Paid'|
45+
|FIX_ACCEPTED_ISSUE_LABEL|the label name for fix accepted, should be one of the label configured in topcoder x ui|'tcx_FixAccepted'|
4646
|TC_OR_DETAIL_LINK|the link to online review detail of challenge| see `default.js`, OR link for dev environment|
4747

4848
KAFKA_OPTIONS should be object as described in https://github.com/oleksiyk/kafka#ssl

config/default.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ module.exports = {
8181
ISSUE_BID_EMAIL_RECEIVER: process.env.ISSUE_BID_EMAIL_RECEIVER || '',
8282
TC_URL: process.env.TC_URL || 'https://www.topcoder-dev.com',
8383
GITLAB_API_BASE_URL: process.env.GITLAB_API_BASE_URL || 'https://gitlab.com',
84-
PAID_ISSUE_LABEL: process.env.PAID_ISSUE_LABEL || 'Paid',
85-
FIX_ACCEPTED_ISSUE_LABEL: process.env.FIX_ACCEPTED_ISSUE_LABEL || 'Fix accepted',
86-
READY_FOR_REVIEW_ISSUE_LABEL: process.env.READY_FOR_REVIEW_ISSUE_LABEL || 'Ready for review',
84+
PAID_ISSUE_LABEL: process.env.PAID_ISSUE_LABEL || 'tcx_Paid',
85+
FIX_ACCEPTED_ISSUE_LABEL: process.env.FIX_ACCEPTED_ISSUE_LABEL || 'tcx_FixAccepted',
86+
READY_FOR_REVIEW_ISSUE_LABEL: process.env.READY_FOR_REVIEW_ISSUE_LABEL || 'tcx_ReadyForReview',
8787
TC_OR_DETAIL_LINK: process.env.TC_OR_DETAIL_LINK || 'https://software.topcoder-dev.com/review/actions/ViewProjectDetails?pid=',
8888
RETRY_COUNT: process.env.RETRY_COUNT || 3,
8989
RETRY_INTERVAL: process.env.RETRY_INTERVAL || 120000, // 2 minutes

configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ The following config parameters are supported, they are defined in `config/defau
2323
|ISSUE_BID_EMAIL_RECEIVER| the email receiver about bid email||
2424
|TC_URL| the base URL of topcoder to get the challenge URL| defaults to `https://www.topcoder-dev.com`|
2525
|GITLAB_API_BASE_URL| the URL for gitlab host| defaults to `https://gitlab.com`|
26-
|PAID_ISSUE_LABEL|the label name for paid, should be one of the label configured in topcoder x ui|'Paid'|
27-
|FIX_ACCEPTED_ISSUE_LABEL|the label name for fix accepted, should be one of the label configured in topcoder x ui|'Fix Accepted'|
26+
|PAID_ISSUE_LABEL|the label name for paid, should be one of the label configured in topcoder x ui|'tcx_Paid'|
27+
|FIX_ACCEPTED_ISSUE_LABEL|the label name for fix accepted, should be one of the label configured in topcoder x ui|'tcx_FixAccepted'|
2828
|TC_OR_DETAIL_LINK|the link to online review detail of challenge| see `default.js`, OR link for dev environment|
2929
|RETRY_COUNT| the number of times an event should be retried to process| 3|
3030
|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'|
31+
|READY_FOR_REVIEW_ISSUE_LABEL| the label name for ready for review, should be one of the label configured in topcoder x ui|'tcx_ReadyForReview'|
3232

3333
KAFKA_OPTIONS should be object as described in https://github.com/oleksiyk/kafka#ssl
3434
For using with SSL, the options should be as

models/CopilotPayment.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Copyright (c) 2018 TopCoder, Inc. All rights reserved.
3+
*/
4+
5+
/**
6+
* Schema for copilot Payment.
7+
* @author TCSCODER
8+
* @version 1.0
9+
*/
10+
11+
'use strict';
12+
13+
const mongoose = require('mongoose');
14+
15+
const schema = new mongoose.Schema({
16+
project: {type: mongoose.Schema.Types.ObjectId, ref: 'Project'},
17+
amount: {type: Number, required: true},
18+
description: {type: String, required: true},
19+
challengeId: {type: Number, required: false},
20+
closed: {type: Boolean, required: true, default: false},
21+
username: {type: String, required: true},
22+
status: {type: String}
23+
});
24+
25+
schema.index({project: 1});
26+
schema.index({username: 1});
27+
schema.index({challengeId: 1});
28+
schema.index({closed: 1});
29+
30+
module.exports = schema;

models/Payment.js

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

models/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const models = {
2222
Project: connection.model('Project', require('./Project')),
2323
User: connection.model('User', require('./User')),
2424
UserMapping: connection.model('UserMapping', require('./UserMapping')),
25-
Payment: connection.model('Payment', require('./Payment'))
25+
CopilotPayment: connection.model('CopilotPayment', require('./CopilotPayment'))
2626
};
2727
/* eslint-enable global-require */
2828

0 commit comments

Comments
 (0)