@@ -18,11 +18,6 @@ let scrumGenerationInProgress = false;
18
18
let orgName = '' ;
19
19
20
20
function allIncluded ( outputTarget = 'email' ) {
21
-
22
-
23
-
24
-
25
-
26
21
if ( scrumGenerationInProgress ) {
27
22
console . warn ( '[SCRUM-HELPER]: Scrum generation already in progress, aborting new call.' ) ;
28
23
return ;
@@ -182,10 +177,10 @@ function allIncluded(outputTarget = 'email') {
182
177
log ( 'Restored cache from storage' ) ;
183
178
}
184
179
185
- if ( typeof items . orgName !== 'undefined' ) {
186
- orgName = items . orgName || '' ;
187
- console . log ( '[SCRUM-HELPER] orgName set to:' , orgName ) ;
188
- }
180
+ if ( typeof items . orgName !== 'undefined' ) {
181
+ orgName = items . orgName || '' ;
182
+ console . log ( '[SCRUM-HELPER] orgName set to:' , orgName ) ;
183
+ }
189
184
} ,
190
185
) ;
191
186
}
@@ -332,7 +327,7 @@ function allIncluded(outputTarget = 'email') {
332
327
}
333
328
334
329
async function fetchGithubData ( ) {
335
- const cacheKey = `${ githubUsername } -${ startingDate } -${ endingDate } -${ orgName || 'all' } ` ;
330
+ const cacheKey = `${ githubUsername } -${ startingDate } -${ endingDate } -${ orgName || 'all' } ` ;
336
331
337
332
if ( githubCache . fetching || ( githubCache . cacheKey === cacheKey && githubCache . data ) ) {
338
333
log ( 'Fetch already in progress or data already fetched. Skipping fetch.' ) ;
@@ -404,19 +399,19 @@ function allIncluded(outputTarget = 'email') {
404
399
log ( 'Making public requests' ) ;
405
400
}
406
401
407
- // Build org part for query only if orgName is set and not empty
408
- console . log ( '[SCRUM-HELPER] orgName before API query:' , orgName ) ;
409
- console . log ( '[SCRUM-HELPER] orgName type:' , typeof orgName ) ;
410
- console . log ( '[SCRUM-HELPER] orgName length:' , orgName ? orgName . length : 0 ) ;
411
- let orgPart = orgName && orgName . trim ( ) ? `+org%3A${ orgName } ` : '' ;
412
- console . log ( '[SCRUM-HELPER] orgPart for API:' , orgPart ) ;
413
- console . log ( '[SCRUM-HELPER] orgPart length:' , orgPart . length ) ;
414
- let issueUrl = `https://api.github.com/search/issues?q=author%3A${ githubUsername } ${ orgPart } +created %3A${ startingDate } ..${ endingDate } &per_page=100` ;
415
- let prUrl = `https://api.github.com/search/issues?q=commenter%3A${ githubUsername } ${ orgPart } +updated%3A${ startingDate } ..${ endingDate } &per_page=100` ;
416
- console . log ( '[SCRUM-HELPER] issueUrl:' , issueUrl ) ;
417
- console . log ( '[SCRUM-HELPER] prUrl:' , prUrl ) ;
418
- let userUrl = `https://api.github.com/users/${ githubUsername } ` ;
419
-
402
+ // Build org part for query only if orgName is set and not empty
403
+ console . log ( '[SCRUM-HELPER] orgName before API query:' , orgName ) ;
404
+ console . log ( '[SCRUM-HELPER] orgName type:' , typeof orgName ) ;
405
+ console . log ( '[SCRUM-HELPER] orgName length:' , orgName ? orgName . length : 0 ) ;
406
+ let orgPart = orgName && orgName . trim ( ) ? `+org%3A${ orgName } ` : '' ;
407
+ console . log ( '[SCRUM-HELPER] orgPart for API:' , orgPart ) ;
408
+ console . log ( '[SCRUM-HELPER] orgPart length:' , orgPart . length ) ;
409
+ let issueUrl = `https://api.github.com/search/issues?q=author%3A${ githubUsername } ${ orgPart } +updated %3A${ startingDate } ..${ endingDate } &per_page=100` ;
410
+ let prUrl = `https://api.github.com/search/issues?q=commenter%3A${ githubUsername } ${ orgPart } +updated%3A${ startingDate } ..${ endingDate } &per_page=100` ;
411
+ console . log ( '[SCRUM-HELPER] issueUrl:' , issueUrl ) ;
412
+ console . log ( '[SCRUM-HELPER] prUrl:' , prUrl ) ;
413
+ let userUrl = `https://api.github.com/users/${ githubUsername } ` ;
414
+
420
415
try {
421
416
// throttling 500ms to avoid burst
422
417
await new Promise ( res => setTimeout ( res , 500 ) ) ;
@@ -681,7 +676,6 @@ function allIncluded(outputTarget = 'email') {
681
676
let content ;
682
677
if ( lastWeekContribution == true || yesterdayContribution == true ) {
683
678
content = `<b>1. What did I do ${ weekOrDay } ?</b><br>
684
-
685
679
${ lastWeekUl } <br>
686
680
<b>2. What do I plan to do ${ weekOrDay2 } ?</b><br>
687
681
${ nextWeekUl } <br>
0 commit comments