# Contributing - 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, 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`, 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.