@@ -70,6 +70,10 @@ function allIncluded(outputTarget = 'email') {
7070 '<div style="vertical-align:middle;display: inline-block;padding: 0px 4px;font-size:9px;font-weight: 600;color: #fff;text-align: center;background-color: #d73a49;border-radius: 3px;line-height: 12px;margin-bottom: 2px;" class="State State--red">closed</div>' ;
7171 let issue_opened_button =
7272 '<div style="vertical-align:middle;display: inline-block;padding: 0px 4px;font-size:9px;font-weight: 600;color: #fff;text-align: center;background-color: #2cbe4e;border-radius: 3px;line-height: 12px;margin-bottom: 2px;" class="State State--green">open</div>' ;
73+ let issue_closed_completed_button =
74+ '<div style="vertical-align:middle;display: inline-block;padding: 0px 4px;font-size:9px;font-weight: 600;color: #fff;text-align: center;background-color: #6f42c1;border-radius: 3px;line-height: 12px;margin-bottom: 2px;" class="State State--purple">closed</div>' ;
75+ let issue_closed_notplanned_button =
76+ '<div style="vertical-align:middle;display: inline-block;padding: 0px 4px;font-size:9px;font-weight: 600;color: #fff;text-align: center;background-color: #808080;border-radius: 3px;line-height: 12px;margin-bottom: 2px;" class="State State--gray">closed</div>' ;
7377
7478 function getChromeData ( ) {
7579 console . log ( "[DEBUG] getChromeData called for outputTarget:" , outputTarget ) ;
@@ -1334,8 +1338,18 @@ ${userReason}`;
13341338 li = `<li><i>(${ project } )</i> - Opened Issue(#${ number } ) - <a href='${ html_url } '>${ title } </a>${ showOpenLabel ? ' ' + issue_opened_button : '' } </li>` ;
13351339
13361340 } else if ( item . state === 'closed' ) {
1337- // Always show closed label for closed issues
1338- li = `<li><i>(${ project } )</i> - Opened Issue(#${ number } ) - <a href='${ html_url } '>${ title } </a>${ showOpenLabel ? ' ' + issue_closed_button : '' } </li>` ;
1341+
1342+
1343+ // Use state_reason to distinguish closure reason
1344+ if ( item . state_reason === 'completed' ) {
1345+ li = `<li><i>(${ project } )</i> - Opened Issue(#${ number } ) - <a href='${ html_url } '>${ title } </a> ${ issue_closed_completed_button } </li>` ;
1346+ } else if ( item . state_reason === 'not_planned' ) {
1347+ li = `<li><i>(${ project } )</i> - Opened Issue(#${ number } ) - <a href='${ html_url } '>${ title } </a> ${ issue_closed_notplanned_button } </li>` ;
1348+ } else {
1349+ li = `<li><i>(${ project } )</i> - Opened Issue(#${ number } ) - <a href='${ html_url } '>${ title } </a> ${ issue_closed_button } </li>` ;
1350+ }
1351+
1352+
13391353 } else {
13401354 // Fallback for unexpected state
13411355 li = `<li><i>(${ project } )</i> - Opened Issue(#${ number } ) - <a href='${ html_url } '>${ title } </a></li>` ;
0 commit comments