Skip to content

Commit 808757c

Browse files
dunglashenderkes
andauthored
docs: revise bug report template for improved instructions (#2181)
Updated bug report template for clarity and detail. --------- Signed-off-by: Kévin Dunglas <kevin@dunglas.fr> Co-authored-by: henderkes <m@pyc.ac>
1 parent 16a70e4 commit 808757c

3 files changed

Lines changed: 57 additions & 10 deletions

File tree

.editorconfig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ root = true
44
end_of_line = lf
55
insert_final_newline = true
66

7-
[*.sh]
7+
[*.{sh,Dockerfile}]
88
indent_style = tab
99
tab_width = 4
1010

11-
[*.Dockerfile]
12-
indent_style = tab
13-
tab_width = 4
11+
[*.{yaml,yml}]
12+
indent_style = space
13+
tab_width = 2

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,18 @@ body:
77
attributes:
88
value: |
99
Thanks for taking the time to fill out this bug report!
10-
Before submitting a bug, please double-check that your problem [is not
11-
a known issue](https://frankenphp.dev/docs/known-issues/)
12-
(especially if you use XDebug or Tideways), and that is has not
13-
[already been reported](https://github.com/php/frankenphp/issues).
10+
11+
Before submitting, please ensure that your issue:
12+
13+
* Is not [a known issue](https://frankenphp.dev/docs/known-issues/).
14+
* Has not [already been reported](https://github.com/php/frankenphp/issues).
15+
* Is not caused by a dependency (like Caddy or PHP itself). If the issue is with a dependency, please report it to the upstream project directly.
1416
- type: textarea
1517
id: what-happened
1618
attributes:
1719
label: What happened?
1820
description: |
19-
Tell us what you do, what you get and what you expected.
21+
Tell us what you do, what you get, and what you expected.
2022
Provide us with some step-by-step instructions to reproduce the issue.
2123
validations:
2224
required: true
@@ -29,8 +31,9 @@ body:
2931
- Docker (Debian Trixie)
3032
- Docker (Debian Bookworm)
3133
- Docker (Alpine)
34+
- apk packages
3235
- deb packages
33-
- rpm packages
36+
- RPM packages
3437
- Static binary
3538
- Custom (tell us more in the description)
3639
default: 0
@@ -55,6 +58,8 @@ body:
5558
options:
5659
- GNU/Linux
5760
- macOS
61+
- Windows
62+
- FreeBSD
5863
- Other (tell us more in the description)
5964
default: 0
6065
validations:
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Wrap Issue Content
2+
on:
3+
issues:
4+
types: [opened, edited]
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
wrap_content:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
issues: write
14+
steps:
15+
- uses: actions/github-script@v7
16+
with:
17+
script: |
18+
const body = context.payload.issue.body;
19+
20+
const wrapSection = (inputBody, marker, summary) => {
21+
const regex = new RegExp(`(${marker})\\s*([\\s\\S]*?)(?=\\n### |$)`);
22+
23+
return inputBody.replace(regex, (match, header, content) => {
24+
const trimmed = content.trim();
25+
if (!trimmed || trimmed.includes("<details>")) return match;
26+
27+
return `${header}\n\n<details>\n<summary>${summary}</summary>\n\n${trimmed}\n\n</details>\n`;
28+
});
29+
};
30+
31+
let newBody = body;
32+
newBody = wrapSection(newBody, "### PHP configuration", "phpinfo() output");
33+
newBody = wrapSection(newBody, "### Relevant log output", "Relevant log output");
34+
35+
if (newBody !== body) {
36+
await github.rest.issues.update({
37+
owner: context.repo.owner,
38+
repo: context.repo.repo,
39+
issue_number: context.issue.number,
40+
body: newBody
41+
});
42+
}

0 commit comments

Comments
 (0)