From 386971845088605aa8ecf337807213eae08b12db Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Sat, 24 Oct 2026 21:10:03 +0000 Subject: [PATCH] docs: correct the fork pull request policy and add maintainer setup State the real Gitea approval rule for fork pull requests, require a REUSE.toml annotation for third-party material, describe the release changelog files, and list the repository settings the workflows cannot enforce (protected v* tags, protected main, the package push credential). Drop the references to the private environment repository. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm --- CONTRIBUTING.md | 31 ++++++++++++++++++++++++------- README.md | 11 +++++------ 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2add830..feafde3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,19 +1,36 @@ # Contributing -- Open a pull request against `main`. Pull requests from forks need a - maintainer's approval before any workflow runs, and CI never receives secrets - on pull requests. +- Open a pull request against `main`. A first-time contributor's fork pull + request needs a maintainer's approval before workflows run (Gitea waives this + once you have a merged pull request). Workflows on fork pull requests get no + secrets and a read-only token. - Commit messages follow [Conventional Commits](https://www.conventionalcommits.org/) (`feat:`, `fix:`, `docs:`, `ci:` ...). CI checks every commit. - Every user-visible change needs a changelog fragment in `changelogs/fragments/` (antsibull-changelog format, a YAML file with a section such as `minor_changes:` or `bugfixes:`). Pure CI or docs changes use `trivial:`. - Role variables carry the role name as a prefix (`_`). -- Third-party material needs an SPDX header and an entry in `NOTICE`. +- Third-party material needs an SPDX header, a `REUSE.toml` annotation (it + overrides file headers) and an entry in `NOTICE`. - Set up the tooling with `pip install -r requirements-dev.txt` in a virtualenv, then run `pre-commit install --install-hooks` once and `pre-commit run --all-files` before pushing. - Never commit credentials, tokens or key material. -- Releases are cut by the maintainer: bump `version` in `galaxy.yml`, run - `antsibull-changelog release` in a release PR, then push an annotated - `vX.Y.Z` tag. +- Releases are cut by the maintainer: bump `version` in `galaxy.yml`, add a + `release_summary:` fragment, run `antsibull-changelog release` in a release PR + (commit the generated `CHANGELOG.rst` and `changelogs/.plugin-cache.yaml`), then + push an annotated `vX.Y.Z` tag. + +## Maintainer setup + +Settings the workflows cannot enforce and the repository needs before it accepts +outside contributions: + +- Protect the `v*` tags so only maintainers can create them. A tag run uses the + workflow files of the tagged commit and may receive organisation secrets. +- Protect `main`: pull request required, with the `Lint` and `Build` checks. +- The image workflow (`.gitea/workflows/image.yml`) pushes with the Actions job token + when Gitea allows it, otherwise with the organisation secrets + `PACKAGE_PUSH_USER` and `PACKAGE_PUSH_TOKEN` (a bot user with write access to the + organisation's packages and a token with only the `write:package` scope). Keep + those the only credentials stored at organisation level. diff --git a/README.md b/README.md index 2de8407..ca7c8c9 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,8 @@ An Ansible Collection of reusable, hardened roles for a self-hosted home lab: Linux baseline, firewall, SSH, user management and, in later releases, Proxmox, Gitea and Gitea Actions runner roles. -Status: scaffolding. The Collection holds no roles yet; roles arrive in waves -(see the extraction plan in the environment repo's ADR 0001). Version 1.0.0 is -reserved for the first stable release. +Status: scaffolding. The Collection holds no roles yet; roles arrive in waves. +Version 1.0.0 is reserved for the first stable release. ## Consuming @@ -41,6 +40,6 @@ attribution in `NOTICE`. The repository follows the REUSE specification ## Development -See `CONTRIBUTING.md`. The release and consumption contract is recorded as ADR -0004 ("The Collection is a public repo released by operator-pushed semver tags -and consumed by FQCN from a baked image") in the maintainer's environment repo. +See `CONTRIBUTING.md`. Releases follow semantic versioning: annotated `vX.Y.Z` +tags that only the maintainer can push, a changelog built from antsibull-changelog +fragments, and consumption by pinned git tag and FQCN.