From 0c4b0c04d764f7b989513bb2e3b636d592509a6e Mon Sep 17 00:00:00 2001 From: Bram Date: Sun, 4 Sep 2022 18:22:12 +0200 Subject: Tidy output of `perlbug` for pasting on GitHub Clean up the report created by `perlbug` so that it looks better when pasted in a GitHub issue: - Put the 'perl configuration' in a code-block - Hide some sentences - Clean up 'Flags' section (it was shown as a very big header and taking up quite a lot of space) - Add `**Description**`, `**Steps to Reproduce**` and `**Expected behaviour**` in the body of the report (similar to the GitHub issue template) - If this is a report about a core module then also put the name of the Module at the top (it's still included in 'Flags' as well) - ... (There are two newlines added before 'Flags', this is to deal with someone using `perlbug -b foo`, without the newlines GitHub would make turn the 'foo' into a title) --- utils/perlbug.PL | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) (limited to 'utils') diff --git a/utils/perlbug.PL b/utils/perlbug.PL index 4715e9dc4d..444816099d 100644 --- a/utils/perlbug.PL +++ b/utils/perlbug.PL @@ -86,7 +86,7 @@ BEGIN { $::HaveWrap = ($@ eq ""); }; -our $VERSION = "1.42"; +our $VERSION = "1.43"; #TODO: # make sure failure (transmission-wise) of Mail::Send is accounted for. @@ -620,6 +620,10 @@ generated with the help of perlbug $VERSION running under perl $perl_version. EOF + if ($report_about_module) { + print REP "Module: $report_about_module\n\n"; + } + if ($body) { print REP $body; } elsif ($usefile) { @@ -646,12 +650,25 @@ EOF print REP <<'EOF'; ----------------------------------------------------------------- -[Please describe your issue here] + +**Description** + -[Please do not change anything below this line] ------------------------------------------------------------------ + +**Steps to Reproduce** + + + + +**Expected behavior** + + + + + + EOF } } @@ -671,26 +688,30 @@ sub Dump { $severity ||= 'low'; print OUT <