diff --git a/.editorconfig b/.editorconfig index ff8d338dcc..412d0f9382 100644 --- a/.editorconfig +++ b/.editorconfig @@ -4,10 +4,10 @@ root = true end_of_line = lf insert_final_newline = true -[*.sh] +[*.{sh,Dockerfile}] indent_style = tab tab_width = 4 -[*.Dockerfile] -indent_style = tab -tab_width = 4 +[*.{yaml,yml}] +indent_style = space +tab_width = 2 diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index f2645d0c43..dc6416261c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -7,16 +7,18 @@ body: attributes: value: | Thanks for taking the time to fill out this bug report! - Before submitting a bug, please double-check that your problem [is not - a known issue](https://frankenphp.dev/docs/known-issues/) - (especially if you use XDebug or Tideways), and that is has not - [already been reported](https://github.com/php/frankenphp/issues). + + Before submitting, please ensure that your issue: + + * Is not [a known issue](https://frankenphp.dev/docs/known-issues/). + * Has not [already been reported](https://github.com/php/frankenphp/issues). + * 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. - type: textarea id: what-happened attributes: label: What happened? description: | - Tell us what you do, what you get and what you expected. + Tell us what you do, what you get, and what you expected. Provide us with some step-by-step instructions to reproduce the issue. validations: required: true @@ -29,8 +31,9 @@ body: - Docker (Debian Trixie) - Docker (Debian Bookworm) - Docker (Alpine) + - apk packages - deb packages - - rpm packages + - RPM packages - Static binary - Custom (tell us more in the description) default: 0 @@ -55,6 +58,8 @@ body: options: - GNU/Linux - macOS + - Windows + - FreeBSD - Other (tell us more in the description) default: 0 validations: diff --git a/.github/workflows/wrap-issue-details.yaml b/.github/workflows/wrap-issue-details.yaml new file mode 100644 index 0000000000..e04b69f088 --- /dev/null +++ b/.github/workflows/wrap-issue-details.yaml @@ -0,0 +1,42 @@ +name: Wrap Issue Content +on: + issues: + types: [opened, edited] + +permissions: + contents: read + +jobs: + wrap_content: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - uses: actions/github-script@v7 + with: + script: | + const body = context.payload.issue.body; + + const wrapSection = (inputBody, marker, summary) => { + const regex = new RegExp(`(${marker})\\s*([\\s\\S]*?)(?=\\n### |$)`); + + return inputBody.replace(regex, (match, header, content) => { + const trimmed = content.trim(); + if (!trimmed || trimmed.includes("
")) return match; + + return `${header}\n\n
\n${summary}\n\n${trimmed}\n\n
\n`; + }); + }; + + let newBody = body; + newBody = wrapSection(newBody, "### PHP configuration", "phpinfo() output"); + newBody = wrapSection(newBody, "### Relevant log output", "Relevant log output"); + + if (newBody !== body) { + await github.rest.issues.update({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body: newBody + }); + }