Skip to content

Commit 3f33131

Browse files
committed
fix PR injection
Signed-off-by: Vedansh Saini <[email protected]>
1 parent d6c2ef2 commit 3f33131

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

src/scripts/scrumHelper.js

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ function allIncluded() {
140140
return WeekDisplayPadded;
141141
}
142142

143-
const DEBUG = false;
143+
const DEBUG = true;
144144
function log( ...args) {
145145
if(DEBUG) {
146146
console.log(`[SCRUM-HELPER]:`, ...args);
@@ -476,7 +476,12 @@ function allIncluded() {
476476

477477
// write PRs Reviewed
478478
function writeGithubPrsReviews() {
479-
items = githubPrsReviewData.items;
479+
let items = githubPrsReviewData.items;
480+
log('Processing PR reviews:', {
481+
hasItems: !!items,
482+
itemCount: items?.length,
483+
firstItem: items?.[0]
484+
});
480485
if (!items) {
481486
logError('No Github PR review data available');
482487
return;
@@ -694,10 +699,15 @@ function allIncluded() {
694699
}, 500);
695700

696701
//check for github safe writing
697-
let intervalWriteGithub = setInterval(() => {
698-
if (scrumBody && githubUsername && githubIssuesData && githubPrsReviewData ) {
699-
clearInterval(intervalWriteGithub);
702+
let intervalWriteGithubIssues = setInterval(() => {
703+
if (scrumBody && githubUsername && githubIssuesData ) {
704+
clearInterval(intervalWriteGithubIssues);
700705
writeGithubIssuesPrs();
706+
}
707+
}, 500);
708+
let intervalWriteGithubPrs = setInterval(() => {
709+
if (scrumBody && githubUsername && githubPrsReviewData ) {
710+
clearInterval(intervalWriteGithubPrs);
701711
writeGithubPrsReviews();
702712
}
703713
}, 500);

0 commit comments

Comments
 (0)