@@ -937,7 +937,7 @@ ${userReason}`;
937
937
let prText = '' ;
938
938
prText +=
939
939
"<a href='" + pr_arr . html_url + "' target='_blank'>#" + pr_arr . number + '</a> (' + pr_arr . title + ') ' ;
940
- if ( pr_arr . state === 'open' ) prText += issue_opened_button ;
940
+ if ( showOpenLabel && pr_arr . state === 'open' ) prText += issue_opened_button ;
941
941
// Do not show closed label for reviewed PRs
942
942
prText += ' ' ;
943
943
repoLi += prText ;
@@ -955,7 +955,7 @@ ${userReason}`;
955
955
'</a> (' +
956
956
pr_arr1 . title +
957
957
') ' ;
958
- if ( pr_arr1 . state === 'open' ) prText1 += issue_opened_button ;
958
+ if ( showOpenLabel && pr_arr1 . state === 'open' ) prText1 += issue_opened_button ;
959
959
// Do not show closed label for reviewed PRs
960
960
prText1 += ' </li>' ;
961
961
repoLi += prText1 ;
@@ -1087,9 +1087,9 @@ ${userReason}`;
1087
1087
} else { }
1088
1088
const prAction = isNewPR ? 'Made PR' : 'Existing PR' ;
1089
1089
if ( isDraft ) {
1090
- li = `<li><i>(${ project } )</i> - Made PR (#${ number } ) - <a href='${ html_url } '>${ title } </a> ${ pr_draft_button } </li>` ;
1090
+ li = `<li><i>(${ project } )</i> - Made PR (#${ number } ) - <a href='${ html_url } '>${ title } </a>${ showOpenLabel ? ' ' + pr_draft_button : '' } </li>` ;
1091
1091
} else if ( item . state === 'open' ) {
1092
- li = `<li><i>(${ project } )</i> - ${ prAction } (#${ number } ) - <a href='${ html_url } '>${ title } </a> ${ pr_open_button } ` ;
1092
+ li = `<li><i>(${ project } )</i> - ${ prAction } (#${ number } ) - <a href='${ html_url } '>${ title } </a>${ showOpenLabel ? ' ' + pr_open_button : '' } ` ;
1093
1093
if ( showCommits && item . _allCommits && item . _allCommits . length && ! isNewPR ) {
1094
1094
log ( `[PR DEBUG] Rendering commits for existing PR #${ number } :` , item . _allCommits ) ;
1095
1095
item . _allCommits . forEach ( commit => {
@@ -1106,9 +1106,9 @@ ${userReason}`;
1106
1106
merged = mergedStatusResults [ `${ owner } /${ repo } #${ number } ` ] ;
1107
1107
}
1108
1108
if ( merged === true ) {
1109
- li = `<li><i>(${ project } )</i> - Made PR (#${ number } ) - <a href='${ html_url } '>${ title } </a> ${ pr_merged_button } </li>` ;
1109
+ li = `<li><i>(${ project } )</i> - Made PR (#${ number } ) - <a href='${ html_url } '>${ title } </a>${ showOpenLabel ? ' ' + pr_merged_button : '' } </li>` ;
1110
1110
} else {
1111
- li = `<li><i>(${ project } )</i> - Made PR (#${ number } ) - <a href='${ html_url } '>${ title } </a> ${ pr_closed_button } </li>` ;
1111
+ li = `<li><i>(${ project } )</i> - Made PR (#${ number } ) - <a href='${ html_url } '>${ title } </a>${ showOpenLabel ? ' ' + pr_closed_button : '' } </li>` ;
1112
1112
}
1113
1113
}
1114
1114
lastWeekArray . push ( li ) ;
@@ -1125,15 +1125,15 @@ ${userReason}`;
1125
1125
html_url +
1126
1126
"' target='_blank'>" +
1127
1127
title +
1128
- '</a> ' +
1129
- issue_opened_button +
1128
+ '</a>' + ( showOpenLabel ? ' ' + issue_opened_button : '' ) +
1130
1129
' </li>' ;
1131
1130
nextWeekArray . push ( li2 ) ;
1132
1131
}
1133
1132
if ( item . state === 'open' ) {
1134
- li = `<li><i>(${ project } )</i> - Opened Issue(#${ number } ) - <a href='${ html_url } '>${ title } </a> ${ issue_opened_button } </li>` ;
1133
+ li = `<li><i>(${ project } )</i> - Opened Issue(#${ number } ) - <a href='${ html_url } '>${ title } </a>${ showOpenLabel ? ' ' + issue_opened_button : '' } </li>` ;
1135
1134
} else if ( item . state === 'closed' ) {
1136
1135
1136
+
1137
1137
// Use state_reason to distinguish closure reason
1138
1138
if ( item . state_reason === 'completed' ) {
1139
1139
li = `<li><i>(${ project } )</i> - Opened Issue(#${ number } ) - <a href='${ html_url } '>${ title } </a> ${ issue_closed_completed_button } </li>` ;
@@ -1143,6 +1143,7 @@ ${userReason}`;
1143
1143
li = `<li><i>(${ project } )</i> - Opened Issue(#${ number } ) - <a href='${ html_url } '>${ title } </a> ${ issue_closed_button } </li>` ;
1144
1144
}
1145
1145
1146
+
1146
1147
} else {
1147
1148
li =
1148
1149
'<li><i>(' +
0 commit comments