From 7f0c61a9bd6410262d6091d1b608a1f8d6e3278e Mon Sep 17 00:00:00 2001 From: Gabriele Bartolini Date: Fri, 29 May 2026 15:01:58 +1000 Subject: [PATCH 1/2] docs: add pull request templates Add two GitHub PR templates with contributor and maintainer checklists: - new_extension.md: full lifecycle checklist for adding a new extension (proposal link, package verification, scaffolding, metadata/renovate/license gates, E2E, README, CODEOWNERS and maintenance commitment). - default.md: lighter checklist for version bumps, fixes, shared tooling and documentation changes; applied automatically by GitHub. Reference both templates from the "Commit and Submit" section of CONTRIBUTING_NEW_EXTENSION.md, since GitHub does not show a PR template chooser. Assisted-by: Claude Opus 4.8 Signed-off-by: Gabriele Bartolini --- .github/PULL_REQUEST_TEMPLATE/default.md | 59 +++++++++++++ .../PULL_REQUEST_TEMPLATE/new_extension.md | 83 +++++++++++++++++++ CONTRIBUTING_NEW_EXTENSION.md | 10 +++ 3 files changed, 152 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE/default.md create mode 100644 .github/PULL_REQUEST_TEMPLATE/new_extension.md diff --git a/.github/PULL_REQUEST_TEMPLATE/default.md b/.github/PULL_REQUEST_TEMPLATE/default.md new file mode 100644 index 0000000..5a6532d --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/default.md @@ -0,0 +1,59 @@ + + +## Description + + + + + +## Type of change + + + +- [ ] Update to an existing extension (version bump, fix) +- [ ] Shared build infrastructure / tooling change +- [ ] Documentation only +- [ ] Other (please describe above) + + +Closes # + +--- + +## Contributor checklist + +- [ ] My commits are signed off for [DCO](https://developercertificate.org/) + compliance (`git commit -s`). +- [ ] This PR targets the `main` branch of the upstream repository. +- [ ] `task checks:all` passes locally. +- [ ] For changes affecting one or more extensions, the relevant build and E2E + tests pass (e.g. `task bake TARGET=`, `task e2e:test:full TARGET=`). +- [ ] Any `// renovate:` comments touched in `metadata.hcl` / `README.md` remain + intact (`suite=`, `depName=`, `extractVersion=`). +- [ ] Documentation (`README.md`, `BUILD.md`, ...) updated where relevant. + +--- + +## Maintainer review checklist + + + +- [ ] CI is green for all affected targets / shared changes. +- [ ] DCO check passes. +- [ ] Change reviewed for correctness and scope; no unintended targets rebuilt. +- [ ] `// renovate:` annotations preserved so automated version tracking keeps + working. +- [ ] If shared infrastructure changed, the `_shared` filter in + `.github/workflows/bake.yml` was updated when all extensions must rebuild. +- [ ] PR targets `main` and is ready to merge. diff --git a/.github/PULL_REQUEST_TEMPLATE/new_extension.md b/.github/PULL_REQUEST_TEMPLATE/new_extension.md new file mode 100644 index 0000000..afc1b25 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/new_extension.md @@ -0,0 +1,83 @@ + + +## Extension + + + + + +Closes # + +--- + +## Contributor checklist + + + +- [ ] My commits are signed off for [DCO](https://developercertificate.org/) + compliance (`git commit -s`). +- [ ] Experimental commits have been squashed into a single, well-formed commit. +- [ ] This PR targets the `main` branch of the upstream repository. +- [ ] A [New Extension Proposal](https://github.com/cloudnative-pg/postgres-extensions-containers/issues/new/choose) + issue exists and is referenced via `Closes #` above. +- [ ] The commit message follows the format: + ``feat: add `` container image``. +- [ ] The Debian package was verified to exist in the `main` component on both + Debian `stable` (`trixie`) and `oldstable` (`bookworm`) via `apt search`. +- [ ] The extension was scaffolded with `task create-extension NAME=` and all + `TODO` comments in the generated files were resolved. +- [ ] `metadata.hcl` sets the correct `package` (full Debian version) and, when + `create_extension = true`, the matching `sql` (catalog) version. +- [ ] `create_extension` is set correctly (`false` for PostgreSQL *modules* with + no `.control` file — verified with `dpkg -L`). +- [ ] The `// renovate:` comments in `metadata.hcl` and `README.md` are present + and intact (`suite=`, `depName=`, `extractVersion=`). +- [ ] Every component in the image is covered by a license on the + [CNCF Allowlist](https://github.com/cncf/foundation/blob/main/policies-guidance/allowed-third-party-license-policy.md); + SPDX `licenses` in `metadata.hcl` are accurate. +- [ ] `task checks:all` passes locally. +- [ ] Full E2E passes: `task e2e:test:full TARGET=""`. +- [ ] `README.md` is complete and includes working `Cluster` and `Database` + YAML examples. +- [ ] An entry for the new extension folder was added to + [`CODEOWNERS`](../CODEOWNERS) with the component owner's GitHub handle(s). +- [ ] I confirm my commitment to maintain this extension on behalf of the + CloudNativePG community. + +--- + +## Maintainer review checklist + + + +- [ ] The linked proposal issue is approved (label `new-extension`) and the + `Closes #` reference is correct. +- [ ] CI is green: the `bake` workflow built the new target for the full + `pgVersions × distributions × {amd64, arm64}` matrix. +- [ ] DCO check passes and history is a single clean commit with the required + `feat: add ...` message format. +- [ ] License compliance reviewed: all redistributed components (extension + + transitive/system libs) are on the CNCF Allowlist; SPDX `licenses` match. +- [ ] `metadata.hcl` reviewed: `package`/`sql` versions, `create_extension`, + runtime settings (`shared_preload_libraries`, `*_path`, `env`, + `required_extensions`) and behavior flags are correct. +- [ ] `// renovate:` annotations are intact so automated version PRs will track + the package going forward. +- [ ] `Dockerfile` reviewed: final stage is `FROM scratch`, copies only the + expected artifacts, and runs as `65532:65532`. +- [ ] E2E / Chainsaw tests pass and assert the extension (or module) loads + correctly. +- [ ] `README.md` is clear and its `Cluster`/`Database` examples are valid. +- [ ] `CODEOWNERS` entry is present and the component owner(s) accept the + long-term maintenance commitment. +- [ ] PR targets `main` and is ready to merge. diff --git a/CONTRIBUTING_NEW_EXTENSION.md b/CONTRIBUTING_NEW_EXTENSION.md index 60406bd..c915c53 100644 --- a/CONTRIBUTING_NEW_EXTENSION.md +++ b/CONTRIBUTING_NEW_EXTENSION.md @@ -302,5 +302,15 @@ Submission Requirements: file listing the GitHub handles of the component owner(s) for the new extension folder. +> [!IMPORTANT] +> When opening the Pull Request, use the **new extension** template, which +> includes the full contributor checklist for this lifecycle. GitHub does not +> show a chooser for PR templates, so open the PR with this link to preselect +> it: +> [Open a new-extension PR](https://github.com/cloudnative-pg/postgres-extensions-containers/compare?expand=1&template=new_extension.md). +> For any other change (version bumps, fixes, tooling, docs), the +> [default template](https://github.com/cloudnative-pg/postgres-extensions-containers/compare?expand=1&template=default.md) +> is applied automatically. + By submitting, you confirm your commitment to maintain this extension on behalf of the CloudNativePG Community. From 194514802c235f0ab4555d5c638a39a694e03da1 Mon Sep 17 00:00:00 2001 From: Marco Nenciarini Date: Fri, 29 May 2026 10:36:08 +0200 Subject: [PATCH 2/2] docs: fix and refine pull request templates Signed-off-by: Marco Nenciarini --- .../PULL_REQUEST_TEMPLATE/new_extension.md | 26 +++++++++++-------- .../default.md => pull_request_template.md} | 4 +-- CONTRIBUTING_NEW_EXTENSION.md | 5 ++-- 3 files changed, 19 insertions(+), 16 deletions(-) rename .github/{PULL_REQUEST_TEMPLATE/default.md => pull_request_template.md} (96%) diff --git a/.github/PULL_REQUEST_TEMPLATE/new_extension.md b/.github/PULL_REQUEST_TEMPLATE/new_extension.md index afc1b25..44c8600 100644 --- a/.github/PULL_REQUEST_TEMPLATE/new_extension.md +++ b/.github/PULL_REQUEST_TEMPLATE/new_extension.md @@ -39,18 +39,19 @@ Closes # - [ ] `metadata.hcl` sets the correct `package` (full Debian version) and, when `create_extension = true`, the matching `sql` (catalog) version. - [ ] `create_extension` is set correctly (`false` for PostgreSQL *modules* with - no `.control` file — verified with `dpkg -L`). -- [ ] The `// renovate:` comments in `metadata.hcl` and `README.md` are present + no `.control` file, verified with `dpkg -L`). +- [ ] The `renovate:` annotations in `metadata.hcl` and `README.md` are present and intact (`suite=`, `depName=`, `extractVersion=`). - [ ] Every component in the image is covered by a license on the [CNCF Allowlist](https://github.com/cncf/foundation/blob/main/policies-guidance/allowed-third-party-license-policy.md); SPDX `licenses` in `metadata.hcl` are accurate. - [ ] `task checks:all` passes locally. - [ ] Full E2E passes: `task e2e:test:full TARGET=""`. -- [ ] `README.md` is complete and includes working `Cluster` and `Database` - YAML examples. +- [ ] `README.md` is complete and includes a working `Cluster` example (plus a + `Database` example with `CREATE EXTENSION` when `create_extension = true`). - [ ] An entry for the new extension folder was added to - [`CODEOWNERS`](../CODEOWNERS) with the component owner's GitHub handle(s). + [`CODEOWNERS`](https://github.com/cloudnative-pg/postgres-extensions-containers/blob/main/CODEOWNERS) + with the component owner's GitHub handle(s). - [ ] I confirm my commitment to maintain this extension on behalf of the CloudNativePG community. @@ -71,13 +72,16 @@ Closes # - [ ] `metadata.hcl` reviewed: `package`/`sql` versions, `create_extension`, runtime settings (`shared_preload_libraries`, `*_path`, `env`, `required_extensions`) and behavior flags are correct. -- [ ] `// renovate:` annotations are intact so automated version PRs will track +- [ ] `renovate:` annotations are intact so automated version PRs will track the package going forward. -- [ ] `Dockerfile` reviewed: final stage is `FROM scratch`, copies only the - expected artifacts, and runs as `65532:65532`. -- [ ] E2E / Chainsaw tests pass and assert the extension (or module) loads - correctly. -- [ ] `README.md` is clear and its `Cluster`/`Database` examples are valid. +- [ ] `Dockerfile` reviewed: final stage is `FROM scratch` and contains only the + expected artifacts; the `USER 65532:65532` directive matches the nonroot + convention. +- [ ] E2E / Chainsaw tests pass: the extension is registered (when + `create_extension = true`), or the Cluster reaches Healthy with the image + mounted for preload-only modules. +- [ ] `README.md` is clear and its `Cluster` example (and `Database` example + when `create_extension = true`) are valid. - [ ] `CODEOWNERS` entry is present and the component owner(s) accept the long-term maintenance commitment. - [ ] PR targets `main` and is ready to merge. diff --git a/.github/PULL_REQUEST_TEMPLATE/default.md b/.github/pull_request_template.md similarity index 96% rename from .github/PULL_REQUEST_TEMPLATE/default.md rename to .github/pull_request_template.md index 5a6532d..df91bd9 100644 --- a/.github/PULL_REQUEST_TEMPLATE/default.md +++ b/.github/pull_request_template.md @@ -26,8 +26,8 @@ https://github.com/cloudnative-pg/governance/blob/main/CONTRIBUTING.md - [ ] Documentation only - [ ] Other (please describe above) - -Closes # + + --- diff --git a/CONTRIBUTING_NEW_EXTENSION.md b/CONTRIBUTING_NEW_EXTENSION.md index c915c53..9b76769 100644 --- a/CONTRIBUTING_NEW_EXTENSION.md +++ b/CONTRIBUTING_NEW_EXTENSION.md @@ -308,9 +308,8 @@ Submission Requirements: > show a chooser for PR templates, so open the PR with this link to preselect > it: > [Open a new-extension PR](https://github.com/cloudnative-pg/postgres-extensions-containers/compare?expand=1&template=new_extension.md). -> For any other change (version bumps, fixes, tooling, docs), the -> [default template](https://github.com/cloudnative-pg/postgres-extensions-containers/compare?expand=1&template=default.md) -> is applied automatically. +> For any other change (version bumps, fixes, tooling, docs), the default +> template is applied automatically, so you can open the PR normally. By submitting, you confirm your commitment to maintain this extension on behalf of the CloudNativePG Community.