Skip to content

Commit a19bb76

Browse files
authored
Merge pull request #823 from topcoder-platform/develop
[PROD RELEASE] - Q2
2 parents 0b441ab + 69fe32b commit a19bb76

37 files changed

+1407
-49
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ workflows:
149149
context : org-global
150150
filters:
151151
branches:
152-
only: ['develop', 'migration-setup']
152+
only: ['develop', 'migration-setup', 'pm-1378']
153153
- deployProd:
154154
context : org-global
155155
filters:

.github/workflows/code_reviewer.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: AI PR Reviewer
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
permissions:
9+
pull-requests: write
10+
jobs:
11+
tc-ai-pr-review:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Repo
15+
uses: actions/checkout@v3
16+
17+
- name: TC AI PR Reviewer
18+
uses: topcoder-platform/tc-ai-pr-reviewer@master
19+
with:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # The GITHUB_TOKEN is there by default so you just need to keep it like it is and not necessarily need to add it as secret as it will throw an error. [More Details](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret)
21+
LAB45_API_KEY: ${{ secrets.LAB45_API_KEY }}
22+
exclude: '**/*.json, **/*.md, **/*.jpg, **/*.png, **/*.jpeg, **/*.bmp, **/*.webp' # Optional: exclude patterns separated by commas

config/custom-environment-variables.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"dbConfig": {
3131
"masterUrl": "DB_MASTER_URL",
3232
"maxPoolSize": "DB_MAX_POOL_SIZE",
33-
"minPoolSize": "DB_MIN_POOL_SIZE"
33+
"minPoolSize": "DB_MIN_POOL_SIZE",
34+
"schema": "DB_SCHEMA_NAME"
3435
},
3536
"kafkaConfig": {
3637
"groupId": "KAFKA_GROUP_ID",

config/default.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"inviteEmailSubject": "You are invited to Topcoder",
5555
"inviteEmailSectionTitle": "Project Invitation",
5656
"workManagerUrl": "https://challenges.topcoder-dev.com",
57+
"copilotPortalUrl": "https://copilots.topcoder-dev.com",
5758
"accountsAppUrl": "https://accounts.topcoder-dev.com",
5859
"MAX_REVISION_NUMBER": 100,
5960
"UNIQUE_GMAIL_VALIDATION": false,

config/development.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"pubsubExchangeName": "dev.projects",
44
"attachmentsS3Bucket": "topcoder-dev-media",
55
"workManagerUrl": "https://challenges.topcoder-dev.com",
6+
"copilotPortalUrl": "https://copilots.topcoder-dev.com",
67
"fileServiceEndpoint": "https://api.topcoder-dev.com/v5/files",
78
"memberServiceEndpoint": "https://api.topcoder-dev.com/v5/members",
89
"identityServiceEndpoint": "https://api.topcoder-dev.com/v3/",

config/production.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"authDomain": "topcoder.com",
33
"workManagerUrl": "https://challenges.topcoder.com",
4+
"copilotPortalUrl": "https://copilots.topcoder.com",
45
"sfdcBillingAccountNameField": "Billing_Account_name__c",
56
"sfdcBillingAccountMarkupField": "Mark_up__c",
67
"sfdcBillingAccountActiveField": "Active__c"

docs/swagger.yaml

Lines changed: 199 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ info:
1111
You can also set a custom page size up to 100 with the `perPage` parameter.
1212
1313
Pagination response data is included in http headers. By Default, the response header contains links with `next`, `last`, `first`, `prev` resource links.
14-
host: "localhost:3000"
14+
host: "api.topcoder-dev.com"
1515
basePath: /v5
1616
schemes:
17-
- http
17+
- https
1818
produces:
1919
- application/json
2020
consumes:
@@ -411,7 +411,7 @@ paths:
411411
"/projects/copilots/opportunities":
412412
get:
413413
tags:
414-
- projects copilot opportunities
414+
- projects copilot opportunity
415415
operationId: getAllCopilotOpportunities
416416
security:
417417
- Bearer: []
@@ -444,7 +444,7 @@ paths:
444444
description: "Internal Server Error"
445445
schema:
446446
$ref: "#/definitions/ErrorModel"
447-
"/projects/copilots/opportunities/{copilotOpportunityId}":
447+
"/projects/copilots/opportunity/{copilotOpportunityId}":
448448
get:
449449
tags:
450450
- projects copilot opportunity
@@ -471,6 +471,126 @@ paths:
471471
description: "Internal Server Error"
472472
schema:
473473
$ref: "#/definitions/ErrorModel"
474+
"/projects/copilots/opportunity/{copilotOpportunityId}/apply":
475+
post:
476+
tags:
477+
- projects copilot opportunity
478+
operationId: applyCopilotOpportunity
479+
security:
480+
- Bearer: []
481+
description: "Retrieve a specific copilot opportunity."
482+
parameters:
483+
- $ref: "#/parameters/copilotOpportunityIdParam"
484+
- in: body
485+
name: body
486+
schema:
487+
$ref: "#/definitions/ApplyCopilotOpportunity"
488+
responses:
489+
"200":
490+
description: "The copilot opportunity application"
491+
schema:
492+
$ref: "#/definitions/CopilotOpportunityApplication"
493+
"401":
494+
description: "Unauthorized"
495+
schema:
496+
$ref: "#/definitions/ErrorModel"
497+
"403":
498+
description: "Forbidden - User does not have permission"
499+
schema:
500+
$ref: "#/definitions/ErrorModel"
501+
"500":
502+
description: "Internal Server Error"
503+
schema:
504+
$ref: "#/definitions/ErrorModel"
505+
"/projects/copilots/opportunity/{copilotOpportunityId}/applications":
506+
get:
507+
tags:
508+
- projects copilot opportunity applications
509+
operationId: listCopilotOpportunity
510+
security:
511+
- Bearer: []
512+
description: "Retrieve the list copilot opportunity applications."
513+
parameters:
514+
- $ref: "#/parameters/copilotOpportunityIdParam"
515+
- name: sort
516+
required: false
517+
description: >
518+
sort projects by createdAt, updatedAt. Default
519+
is createdAt asc
520+
in: query
521+
type: string
522+
responses:
523+
"200":
524+
description: A list of projects
525+
schema:
526+
type: array
527+
items:
528+
$ref: "#/definitions/CopilotOpportunityApplication"
529+
headers:
530+
X-Next-Page:
531+
type: integer
532+
description: The index of the next page
533+
X-Page:
534+
type: integer
535+
description: The index of the current page (starting at 1)
536+
X-Per-Page:
537+
type: integer
538+
description: The number of items to list per page
539+
X-Prev-Page:
540+
type: integer
541+
description: The index of the previous page
542+
X-Total:
543+
type: integer
544+
description: The total number of items
545+
X-Total-Pages:
546+
type: integer
547+
description: The total number of pages
548+
Link:
549+
type: string
550+
description: Pagination link header.
551+
"401":
552+
description: "Unauthorized"
553+
schema:
554+
$ref: "#/definitions/ErrorModel"
555+
"403":
556+
description: "Forbidden - User does not have permission"
557+
schema:
558+
$ref: "#/definitions/ErrorModel"
559+
"500":
560+
description: "Internal Server Error"
561+
schema:
562+
$ref: "#/definitions/ErrorModel"
563+
"/projects/copilots/opportunity/{copilotOpportunityId}/assign":
564+
post:
565+
tags:
566+
- assign project copilot opportunity
567+
operationId: assignCopilotOpportunity
568+
security:
569+
- Bearer: []
570+
description: "Assign a copilot opportunity with copilot."
571+
parameters:
572+
- $ref: "#/parameters/copilotOpportunityIdParam"
573+
- in: body
574+
name: body
575+
schema:
576+
$ref: "#/definitions/AssignCopilotOpportunity"
577+
responses:
578+
"200":
579+
description: "The response after assigning an copilot opportunity"
580+
schema:
581+
$ref: "#/definitions/CopilotOpportunityAssignResponse"
582+
"401":
583+
description: "Unauthorized"
584+
schema:
585+
$ref: "#/definitions/ErrorModel"
586+
"403":
587+
description: "Forbidden - User does not have permission"
588+
schema:
589+
$ref: "#/definitions/ErrorModel"
590+
"500":
591+
description: "Internal Server Error"
592+
schema:
593+
$ref: "#/definitions/ErrorModel"
474594
"/projects/{projectId}/attachments":
475595
get:
476596
tags:
@@ -5448,6 +5568,13 @@ parameters:
54485568
required: true
54495569
type: integer
54505570
format: int64
5571+
copilotOpportunityIdParam:
5572+
name: copilotOpportunityId
5573+
in: path
5574+
description: copilot opportunity identifier
5575+
required: true
5576+
type: integer
5577+
format: int64
54515578
phaseIdParam:
54525579
name: phaseId
54535580
in: path
@@ -5975,6 +6102,60 @@ definitions:
59756102
format: int64
59766103
description: READ-ONLY. User that last updated this task
59776104
readOnly: true
6105+
CopilotOpportunityApplication:
6106+
type: object
6107+
properties:
6108+
id:
6109+
description: unique identifier
6110+
type: integer
6111+
format: int64
6112+
notes:
6113+
description: notes regarding the application
6114+
type: string
6115+
status:
6116+
description: status of the application
6117+
type: string
6118+
enum:
6119+
- pending
6120+
- accepted
6121+
example: pending
6122+
opportunityId:
6123+
description: copilot request id
6124+
type: integer
6125+
createdAt:
6126+
type: string
6127+
description: Datetime (GMT) when task was created
6128+
readOnly: true
6129+
createdBy:
6130+
type: integer
6131+
format: int64
6132+
description: READ-ONLY. User who created this task
6133+
readOnly: true
6134+
updatedAt:
6135+
type: string
6136+
description: READ-ONLY. Datetime (GMT) when task was updated
6137+
readOnly: true
6138+
updatedBy:
6139+
type: integer
6140+
format: int64
6141+
description: READ-ONLY. User that last updated this task
6142+
readOnly: true
6143+
deletedAt:
6144+
type: string
6145+
description: READ-ONLY. Datetime (GMT) when task was deleted
6146+
readOnly: true
6147+
deletedBy:
6148+
type: integer
6149+
format: int64
6150+
description: READ-ONLY. User that deleted this task
6151+
readOnly: true
6152+
CopilotOpportunityAssignResponse:
6153+
type: object
6154+
properties:
6155+
id:
6156+
description: unique identifier
6157+
type: integer
6158+
format: int64
59786159
Project:
59796160
type: object
59806161
properties:
@@ -6184,6 +6365,20 @@ definitions:
61846365
- customer
61856366
- manager
61866367
- copilot
6368+
ApplyCopilotOpportunity:
6369+
title: Apply Copilot Opportunity
6370+
type: object
6371+
properties:
6372+
notes:
6373+
type: string
6374+
description: notes about applying copilot opportunity
6375+
AssignCopilotOpportunity:
6376+
title: Assign Copilot Opportunity
6377+
type: object
6378+
properties:
6379+
applicationId:
6380+
type: string
6381+
description: The ID of the application to be accepted for the copilot opportunity.
61876382
NewProjectAttachment:
61886383
title: Project attachment request
61896384
type: object

0 commit comments

Comments
 (0)