@@ -70,6 +70,10 @@ function allIncluded(outputTarget = 'email') {
70
70
'<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>' ;
71
71
let issue_opened_button =
72
72
'<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>' ;
73
77
74
78
function getChromeData ( ) {
75
79
console . log ( "[DEBUG] getChromeData called for outputTarget:" , outputTarget ) ;
@@ -1334,8 +1338,18 @@ ${userReason}`;
1334
1338
li = `<li><i>(${ project } )</i> - Opened Issue(#${ number } ) - <a href='${ html_url } '>${ title } </a>${ showOpenLabel ? ' ' + issue_opened_button : '' } </li>` ;
1335
1339
1336
1340
} 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
+
1339
1353
} else {
1340
1354
// Fallback for unexpected state
1341
1355
li = `<li><i>(${ project } )</i> - Opened Issue(#${ number } ) - <a href='${ html_url } '>${ title } </a></li>` ;
0 commit comments