Skip to content

Commit 7578215

Browse files
committed
removed extensive logging, removed depreciated functions, removed comments, refined fetching logic
Signed-off-by: Vedansh Saini <[email protected]>
1 parent aab4b5d commit 7578215

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/scripts/scrumHelper.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,13 +322,15 @@ ${userReason}`;
322322

323323
// write PRs Reviewed
324324
function writeGithubPrsReviews() {
325+
console.log("Starting to process PR reviews");
325326
var items = githubPrsReviewData.items;
326327

327328
reviewedPrsArray = [];
328329
githubPrsReviewDataProcessed = {};
329330

330331
for (var i = 0; i < items.length; i++) {
331332
var item = items[i];
333+
//skip if its your own pr
332334
if (item.user.login === githubUsername) {
333335
continue;
334336
}
@@ -391,14 +393,18 @@ ${userReason}`;
391393
}
392394
repoLi += '</li>';
393395
reviewedPrsArray.push(repoLi);
396+
console.log(`Added repo ${repo} to reviewedPrsArray`);
394397
}
395398

396399
writeScrumBody();
397400
}
398401
function writeGithubIssuesPrs() {
402+
console.log("Starting to process issues/PRs");
399403
var data = githubIssuesData;
404+
console.log("Total items to process:", data.items.length);
400405
var items = data.items;
401406

407+
// Reset arrays at the start
402408
lastWeekArray = [];
403409
nextWeekArray = [];
404410

@@ -421,6 +427,7 @@ ${userReason}`;
421427
if (item.state === 'open' && item.body && item.body.toUpperCase().indexOf('YES') > 0) {
422428
var li2 = `<li><i>(${project})</i> - Work on Issue(#${number}) - <a href='${html_url}'>${title}</a> ${issue_opened_button}</li>`;
423429
nextWeekArray.push(li2);
430+
console.log("Added to nextWeekArray (contains YES)");
424431
}
425432
if (item.state === 'open') {
426433
li = `<li><i>(${project})</i> - Opened Issue(#${number}) - <a href='${html_url}'>${title}</a> ${issue_opened_button}</li>`;
@@ -433,6 +440,12 @@ ${userReason}`;
433440
} else {
434441
}
435442
}
443+
console.log("Final arrays:", {
444+
lastWeekItems: lastWeekArray.length,
445+
nextWeekItems: nextWeekArray.length,
446+
lastWeekContents: lastWeekArray,
447+
nextWeekContents: nextWeekArray
448+
});
436449
writeScrumBody();
437450
}
438451

0 commit comments

Comments
 (0)