Skip to content

Commit 385d745

Browse files
committed
finetuned intervals
Signed-off-by: Vedansh Saini <[email protected]>
1 parent ef8f56e commit 385d745

File tree

1 file changed

+28
-29
lines changed

1 file changed

+28
-29
lines changed

src/scripts/scrumHelper.js

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,10 @@ ${userReason}`;
813813
}
814814

815815
prsReviewDataProcessed = true;
816-
// triggerScrumGeneration();
816+
if(outputTarget === 'email'){
817+
triggerScrumGeneration();
818+
}
819+
817820
}
818821

819822
function triggerScrumGeneration() {
@@ -992,7 +995,9 @@ ${userReason}`;
992995
lastWeekArray.push(li);
993996
}
994997
issuesDataProcessed = true;
995-
// triggerScrumGeneration();
998+
if(outputTarget === 'email'){
999+
triggerScrumGeneration();
1000+
}
9961001
}
9971002

9981003
let intervalBody = setInterval(() => {
@@ -1026,33 +1031,27 @@ ${userReason}`;
10261031
}, 500);
10271032
}, 500);
10281033

1029-
//check for github safe writing
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);
1034+
// check for github safe writing
1035+
let intervalWriteGithubIssues = setInterval(() => {
1036+
if (outputTarget === 'popup') {
1037+
return;
1038+
} else {
1039+
if (scrumBody && githubUsername && githubIssuesData) {
1040+
clearInterval(intervalWriteGithubIssues);
1041+
writeGithubIssuesPrs();
1042+
}
1043+
}
1044+
}, 500);
1045+
let intervalWriteGithubPrs = setInterval(() => {
1046+
if (outputTarget === 'popup') {
1047+
return;
1048+
} else {
1049+
if (scrumBody && githubUsername && githubPrsReviewData) {
1050+
clearInterval(intervalWriteGithubPrs);
1051+
writeGithubPrsReviews();
1052+
}
1053+
}
1054+
}, 500);
10561055
if (!refreshButton_Placed) {
10571056
let intervalWriteButton = setInterval(() => {
10581057
if (document.getElementsByClassName('F0XO1GC-x-b').length == 3 && scrumBody && enableToggle) {

0 commit comments

Comments
 (0)