File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -350,15 +350,16 @@ def main(): # pragma: no cover
350
350
output_file = output_file ,
351
351
)
352
352
353
+ file_name_without_extension = output_file .split ("." )[0 ]
353
354
max_char_count = 65535
354
- if markdown_too_large_for_issue_body ("issue_metrics.md" , max_char_count ):
355
- split_markdown_file ("issue_metrics.md" , max_char_count )
356
- shutil .move ("issue_metrics.md" , "issue_metrics_full .md" )
357
- shutil .move ("issue_metrics_0 .md" , "issue_metrics.md" )
355
+ if markdown_too_large_for_issue_body (output_file , max_char_count ):
356
+ split_markdown_file (output_file , max_char_count )
357
+ shutil .move (output_file , f" { file_name_without_extension } _full .md" )
358
+ shutil .move (f" { file_name_without_extension } _0 .md" , output_file )
358
359
print (
359
- "Issue metrics markdown file is too large for GitHub issue body and has been \
360
- split into multiple files. ie. issue_metrics.md, issue_metrics_1 .md, etc. \
361
- The full file is saved as issue_metrics_full .md\n \
360
+ f "Issue metrics markdown file is too large for GitHub issue body and has been \
361
+ split into multiple files. ie. { output_file } , { file_name_without_extension } _1 .md, etc. \
362
+ The full file is saved as { file_name_without_extension } _full .md\n \
362
363
See https://github.com/github/issue-metrics/blob/main/docs/dealing-with-large-issue-metrics.md"
363
364
)
364
365
Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ def write_to_markdown(
225
225
if search_query :
226
226
file .write (f"Search query used to find these items: `{ search_query } `\n " )
227
227
228
- print ("Wrote issue metrics to issue_metrics.md " )
228
+ print (f "Wrote issue metrics to { output_file_name } " )
229
229
230
230
231
231
def write_overall_metrics_tables (
You can’t perform that action at this time.
0 commit comments