Skip to content

Commit d45fbb4

Browse files
committed
no scrumBody checks in popup
Signed-off-by: Vedansh Saini <[email protected]>
1 parent f0703a9 commit d45fbb4

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

src/scripts/scrumHelper.js

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,8 @@ function allIncluded(outputTarget = 'email') {
409409
reviewedPrsArray = [];
410410
githubPrsReviewDataProccessed = {};
411411

412+
writeGithubIssuesPrs();
413+
writeGithubPrsReviews();
412414
// Update subject
413415
if(!githubCache.subject && scrumSubject) {
414416
scrumSubjectLoaded();
@@ -423,7 +425,7 @@ function allIncluded(outputTarget = 'email') {
423425

424426
//load initial text in scrum body
425427
function writeScrumBody() {
426-
if (!enableToggle || hasInjectedContent) return;
428+
if (!enableToggle || (outputTarget === 'email' && hasInjectedContent)) return;
427429

428430
if(outputTarget ==='email') {
429431
if(!window.emailClientAdapter) {
@@ -486,7 +488,6 @@ function allIncluded(outputTarget = 'email') {
486488
logError('Scrum report div not found');
487489
}
488490
} else {
489-
490491
const elements = window.emailClientAdapter.getEditorElements();
491492
if (!elements || !elements.body) {
492493
console.error('Email client editor not found');
@@ -711,15 +712,29 @@ function allIncluded(outputTarget = 'email') {
711712

712713
//check for github safe writing
713714
let intervalWriteGithubIssues = setInterval(() => {
714-
if (scrumBody && githubUsername && githubIssuesData ) {
715-
clearInterval(intervalWriteGithubIssues);
716-
writeGithubIssuesPrs();
715+
if(outputTarget === 'popup') {
716+
if (githubUsername && githubIssuesData) {
717+
clearInterval(intervalWriteGithubIssues);
718+
writeGithubIssuesPrs();
719+
}
720+
} else {
721+
if (scrumBody && githubUsername && githubIssuesData ) {
722+
clearInterval(intervalWriteGithubIssues);
723+
writeGithubIssuesPrs();
724+
}
717725
}
718726
}, 500);
719727
let intervalWriteGithubPrs = setInterval(() => {
720-
if (scrumBody && githubUsername && githubPrsReviewData ) {
721-
clearInterval(intervalWriteGithubPrs);
722-
writeGithubPrsReviews();
728+
if (outputTarget === 'popup') {
729+
if (githubUsername && githubPrsReviewData) {
730+
clearInterval(intervalWriteGithubPrs);
731+
writeGithubPrsReviews();
732+
}
733+
} else {
734+
if (scrumBody && githubUsername && githubPrsReviewData) {
735+
clearInterval(intervalWriteGithubPrs);
736+
writeGithubPrsReviews();
737+
}
723738
}
724739
}, 500);
725740
if (!refreshButton_Placed) {

0 commit comments

Comments
 (0)