@@ -322,13 +322,15 @@ ${userReason}`;
322
322
323
323
// write PRs Reviewed
324
324
function writeGithubPrsReviews ( ) {
325
+ console . log ( "Starting to process PR reviews" ) ;
325
326
var items = githubPrsReviewData . items ;
326
327
327
328
reviewedPrsArray = [ ] ;
328
329
githubPrsReviewDataProcessed = { } ;
329
330
330
331
for ( var i = 0 ; i < items . length ; i ++ ) {
331
332
var item = items [ i ] ;
333
+ //skip if its your own pr
332
334
if ( item . user . login === githubUsername ) {
333
335
continue ;
334
336
}
@@ -391,14 +393,18 @@ ${userReason}`;
391
393
}
392
394
repoLi += '</li>' ;
393
395
reviewedPrsArray . push ( repoLi ) ;
396
+ console . log ( `Added repo ${ repo } to reviewedPrsArray` ) ;
394
397
}
395
398
396
399
writeScrumBody ( ) ;
397
400
}
398
401
function writeGithubIssuesPrs ( ) {
402
+ console . log ( "Starting to process issues/PRs" ) ;
399
403
var data = githubIssuesData ;
404
+ console . log ( "Total items to process:" , data . items . length ) ;
400
405
var items = data . items ;
401
406
407
+ // Reset arrays at the start
402
408
lastWeekArray = [ ] ;
403
409
nextWeekArray = [ ] ;
404
410
@@ -421,6 +427,7 @@ ${userReason}`;
421
427
if ( item . state === 'open' && item . body && item . body . toUpperCase ( ) . indexOf ( 'YES' ) > 0 ) {
422
428
var li2 = `<li><i>(${ project } )</i> - Work on Issue(#${ number } ) - <a href='${ html_url } '>${ title } </a> ${ issue_opened_button } </li>` ;
423
429
nextWeekArray . push ( li2 ) ;
430
+ console . log ( "Added to nextWeekArray (contains YES)" ) ;
424
431
}
425
432
if ( item . state === 'open' ) {
426
433
li = `<li><i>(${ project } )</i> - Opened Issue(#${ number } ) - <a href='${ html_url } '>${ title } </a> ${ issue_opened_button } </li>` ;
@@ -433,6 +440,12 @@ ${userReason}`;
433
440
} else {
434
441
}
435
442
}
443
+ console . log ( "Final arrays:" , {
444
+ lastWeekItems : lastWeekArray . length ,
445
+ nextWeekItems : nextWeekArray . length ,
446
+ lastWeekContents : lastWeekArray ,
447
+ nextWeekContents : nextWeekArray
448
+ } ) ;
436
449
writeScrumBody ( ) ;
437
450
}
438
451
0 commit comments