File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -383,9 +383,11 @@ async function handleIssueClose(event, issue) {
383
383
comment += ' please reopen it, add the ```' + config . FIX_ACCEPTED_ISSUE_LABEL + '``` label, and then close it again' ; // eslint-disable-line
384
384
await gitHelper . createComment ( event , issue . number , comment ) ;
385
385
closeChallenge = true ;
386
+ return ;
386
387
}
387
388
if ( issue . prizes [ 0 ] === 0 ) {
388
389
closeChallenge = true ;
390
+ return ;
389
391
}
390
392
391
393
// if issue is closed without assignee then do nothing
@@ -429,6 +431,10 @@ async function handleIssueClose(event, issue) {
429
431
logger . debug ( `Getting the topcoder member ID for member name: ${ assigneeMember . topcoderUsername } ` ) ;
430
432
const winnerId = await topcoderApiHelper . getTopcoderMemberId ( assigneeMember . topcoderUsername ) ;
431
433
434
+ resources = await topcoderApiHelper . getResourcesFromChallenge ( dbIssue . challengeId )
435
+
436
+ logger . debug ( `Existing resources: ${ resources } ` ) ;
437
+
432
438
logger . debug ( `Getting the topcoder member ID for copilot name : ${ event . copilot . topcoderUsername } ` ) ;
433
439
// get copilot tc user id
434
440
const copilotTopcoderUserId = await topcoderApiHelper . getTopcoderMemberId ( event . copilot . topcoderUsername ) ;
@@ -442,7 +448,6 @@ async function handleIssueClose(event, issue) {
442
448
addForumWatch : true
443
449
} ;
444
450
await topcoderApiHelper . addResourceToChallenge ( dbIssue . challengeId , copilotResourceBody ) ;
445
-
446
451
// adding reg
447
452
await topcoderApiHelper . assignUserAsRegistrant ( winnerId , dbIssue . challengeId ) ;
448
453
You can’t perform that action at this time.
0 commit comments