@@ -225,32 +225,42 @@ ${filename}: ${summary}
225
225
226
226
const summarize_comment = `${ summarize_final_response }
227
227
228
- ${
229
- filter_ignored_files . length > 0
230
- ? `
231
228
---
232
229
233
- ### Files ignored due to filter (${ filter_ignored_files . length } )
234
- - ${ filter_ignored_files . map ( file => file . filename ) . join ( '\n- ' ) }
230
+ ### Chat with 🤖 OpenAI Bot (\`@openai\`)
231
+ - Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
232
+ - Invite the bot into a review comment chain by tagging \`@openai\` in a reply.
233
+
234
+ ---
235
+
236
+ ${ filter_ignored_files . length > 0
237
+ ? `
238
+ <details>
239
+ <summary>Files ignored due to filter (${ filter_ignored_files . length } )</summary>
240
+
241
+ ### Ignored files
242
+
243
+ * ${ filter_ignored_files . map ( file => file . filename ) . join ( '\n* ' ) }
244
+
245
+ </details>
235
246
`
236
- : ''
237
- }
247
+ : ''
248
+ }
238
249
239
- ${
240
- skipped_files_to_summarize . length > 0
241
- ? `
242
- ### Files not summarized due to max files limit (${
243
- skipped_files_to_summarize . length
244
- } )
245
- - ${ skipped_files_to_summarize . join ( '\n - ' ) } `
246
- : ''
247
- }
250
+ ${ skipped_files_to_summarize . length > 0
251
+ ? `
252
+ <details>
253
+ <summary>Files not summarized due to max files limit (${ skipped_files_to_summarize . length
254
+ } )</summary>
248
255
249
- ---
256
+ ### Not summarized
250
257
251
- ### Chat with 🤖 OpenAI Bot (\`@openai\`)
252
- - Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
253
- - Invite the bot into a review comment chain by tagging \`@openai\` in a reply.
258
+ * ${ skipped_files_to_summarize . join ( '\n* ' ) }
259
+
260
+ </details>
261
+ `
262
+ : ''
263
+ }
254
264
`
255
265
256
266
next_summarize_ids = summarize_final_response_ids
445
455
446
456
// comment about skipped files for review and summarize
447
457
if ( skipped_files_to_review . length > 0 ) {
448
- const tag = '<!-- openai-skipped-files -->'
449
458
// make bullet points for skipped files
450
459
const comment = `
451
- ${ tag }
460
+ ${ skipped_files_to_review . length > 0
461
+ ? `<details>
462
+ <summary>Files not reviewed due to max files limit (${ skipped_files_to_review . length
463
+ } )</summary>
452
464
453
- ${
454
- skipped_files_to_review . length > 0
455
- ? `
456
- ### Files not reviewed due to max files limit (${
457
- skipped_files_to_review . length
458
- } )
459
- - ${ skipped_files_to_review . join ( '\n - ' ) } `
465
+ ### Not reviewed
466
+
467
+ * ${ skipped_files_to_review . join ( '\n* ' ) }
468
+
469
+ </details>
470
+ `
460
471
: ''
461
- }
472
+ }
462
473
`
463
- await commenter . comment ( comment , tag , 'replace' )
474
+ if ( comment . length > 0 ) {
475
+ await commenter . comment ( comment , SUMMARIZE_TAG , 'append' )
476
+ }
464
477
}
465
478
}
466
479
}
0 commit comments