Skip to content

Commit ef8f56e

Browse files
committed
removed duplicacy interval
Signed-off-by: Vedansh Saini <[email protected]>
1 parent 82a82da commit ef8f56e

File tree

1 file changed

+34
-29
lines changed

1 file changed

+34
-29
lines changed

src/scripts/scrumHelper.js

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const DEBUG = false;
1+
const DEBUG = true;
22
function log(...args) {
33
if (DEBUG) {
44
console.log(`[SCRUM-HELPER]:`, ...args);
@@ -596,6 +596,9 @@ function allIncluded(outputTarget = 'email') {
596596
reviewedPrsArray = [];
597597
githubPrsReviewDataProcessed = {};
598598

599+
issuesDataProcessed=false;
600+
prsReviewDataProcessed = false;
601+
599602
// Update subject
600603
if (!githubCache.subject && scrumSubject) {
601604
scrumSubjectLoaded();
@@ -604,6 +607,8 @@ function allIncluded(outputTarget = 'email') {
604607
writeGithubIssuesPrs(),
605608
writeGithubPrsReviews(),
606609
])
610+
log('Both data processing functions completed, generating scrum body');
611+
writeScrumBody();
607612
}
608613

609614
function formatDate(dateString) {
@@ -808,7 +813,7 @@ ${userReason}`;
808813
}
809814

810815
prsReviewDataProcessed = true;
811-
triggerScrumGeneration();
816+
// triggerScrumGeneration();
812817
}
813818

814819
function triggerScrumGeneration() {
@@ -987,7 +992,7 @@ ${userReason}`;
987992
lastWeekArray.push(li);
988993
}
989994
issuesDataProcessed = true;
990-
triggerScrumGeneration();
995+
// triggerScrumGeneration();
991996
}
992997

993998
let intervalBody = setInterval(() => {
@@ -1022,32 +1027,32 @@ ${userReason}`;
10221027
}, 500);
10231028

10241029
//check for github safe writing
1025-
let intervalWriteGithubIssues = setInterval(() => {
1026-
if (outputTarget === 'popup') {
1027-
if (githubUsername && githubIssuesData) {
1028-
clearInterval(intervalWriteGithubIssues);
1029-
writeGithubIssuesPrs();
1030-
}
1031-
} else {
1032-
if (scrumBody && githubUsername && githubIssuesData) {
1033-
clearInterval(intervalWriteGithubIssues);
1034-
writeGithubIssuesPrs();
1035-
}
1036-
}
1037-
}, 500);
1038-
let intervalWriteGithubPrs = setInterval(() => {
1039-
if (outputTarget === 'popup') {
1040-
if (githubUsername && githubPrsReviewData) {
1041-
clearInterval(intervalWriteGithubPrs);
1042-
writeGithubPrsReviews();
1043-
}
1044-
} else {
1045-
if (scrumBody && githubUsername && githubPrsReviewData) {
1046-
clearInterval(intervalWriteGithubPrs);
1047-
writeGithubPrsReviews();
1048-
}
1049-
}
1050-
}, 500);
1030+
// let intervalWriteGithubIssues = setInterval(() => {
1031+
// if (outputTarget === 'popup') {
1032+
// if (githubUsername && githubIssuesData) {
1033+
// clearInterval(intervalWriteGithubIssues);
1034+
// writeGithubIssuesPrs();
1035+
// }
1036+
// } else {
1037+
// if (scrumBody && githubUsername && githubIssuesData) {
1038+
// clearInterval(intervalWriteGithubIssues);
1039+
// writeGithubIssuesPrs();
1040+
// }
1041+
// }
1042+
// }, 500);
1043+
// let intervalWriteGithubPrs = setInterval(() => {
1044+
// if (outputTarget === 'popup') {
1045+
// if (githubUsername && githubPrsReviewData) {
1046+
// clearInterval(intervalWriteGithubPrs);
1047+
// writeGithubPrsReviews();
1048+
// }
1049+
// } else {
1050+
// if (scrumBody && githubUsername && githubPrsReviewData) {
1051+
// clearInterval(intervalWriteGithubPrs);
1052+
// writeGithubPrsReviews();
1053+
// }
1054+
// }
1055+
// }, 500);
10511056
if (!refreshButton_Placed) {
10521057
let intervalWriteButton = setInterval(() => {
10531058
if (document.getElementsByClassName('F0XO1GC-x-b').length == 3 && scrumBody && enableToggle) {

0 commit comments

Comments
 (0)