We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b243bbf + 717b382 commit 0ecfab7Copy full SHA for 0ecfab7
3 files changed
issue_metrics.py
@@ -281,6 +281,7 @@ def main(): # pragma: no cover
281
search_query=search_query,
282
hide_label_metrics=False,
283
hide_items_closed_count=False,
284
+ enable_mentor_count=enable_mentor_count,
285
non_mentioning_links=False,
286
report_title=report_title,
287
output_file=output_file,
@@ -307,6 +308,7 @@ def main(): # pragma: no cover
307
308
309
310
311
312
313
314
@@ -370,6 +372,7 @@ def main(): # pragma: no cover
370
372
371
373
hide_label_metrics=hide_label_metrics,
374
hide_items_closed_count=hide_items_closed_count,
375
376
non_mentioning_links=non_mentioning_links,
377
378
markdown_writer.py
@@ -100,6 +100,7 @@ def write_to_markdown(
100
search_query=None,
101
102
103
+ enable_mentor_count=False,
104
105
report_title="",
106
output_file="",
@@ -168,6 +169,7 @@ def write_to_markdown(
168
169
file,
170
hide_label_metrics,
171
hide_items_closed_count,
172
+ enable_mentor_count,
173
)
174
175
# Write second table with individual issue/pr/discussion metrics
@@ -243,6 +245,7 @@ def write_overall_metrics_tables(
243
245
244
246
247
248
249
):
250
"""Write the overall metrics tables to the markdown file."""
251
if any(
@@ -316,5 +319,6 @@ def write_overall_metrics_tables(
316
319
file.write(f"| Number of items that remain open | {num_issues_opened} |\n")
317
320
if not hide_items_closed_count:
318
321
file.write(f"| Number of items closed | {num_issues_closed} |\n")
- file.write(f"| Number of most active mentors | {num_mentor_count} |\n")
322
+ if enable_mentor_count:
323
+ file.write(f"| Number of most active mentors | {num_mentor_count} |\n")
324
file.write(f"| Total number of items created | {len(issues_with_metrics)} |\n\n")
test_markdown_writer.py
@@ -129,7 +129,6 @@ def test_write_to_markdown(self):
129
"| --- | ---: |\n"
130
"| Number of items that remain open | 2 |\n"
131
"| Number of items closed | 1 |\n"
132
- "| Number of most active mentors | 5 |\n"
133
"| Total number of items created | 2 |\n\n"
134
"| Title | URL | Author | Time to first response | Time to close |"
135
" Time to answer | Time in draft | Time spent in bug | Created At |\n"
@@ -240,7 +239,6 @@ def test_write_to_markdown_with_vertical_bar_in_title(self):
240
239
241
242
@@ -369,6 +367,7 @@ def test_writes_markdown_file_with_non_hidden_columns_only(self):
369
367
search_query="repo:user/repo is:issue",
368
hide_label_metrics=True,
hide_items_closed_count=True,
+ enable_mentor_count=True,
non_mentioning_links=True,
report_title="Issue Metrics",
output_file="issue_metrics.md",
0 commit comments