Each file holds its directory's rules in full: the rule, a one-sentence reason and how it is held (control, review or aspirational). The interim dependency and image section of making-a-change.md moves into scripts/AGENTS.md and images/AGENTS.md; the contributor docs point to the new files. Closes #182 Assisted-by: Claude Code:claude-opus-5-5
101 lines
5.7 KiB
Markdown
101 lines
5.7 KiB
Markdown
# Making a change
|
|
|
|
Read this before starting a branch, committing, filing an issue or opening a pull request.
|
|
|
|
Every rule below gives its reason and how it is held: by a control (a named hook or check), by
|
|
review, or aspirational (checked by nothing and nobody). Links between the contributor docs are
|
|
held by review until an offline link check exists. Rules for roles are in
|
|
[roles/AGENTS.md](../../roles/AGENTS.md), and for scripts, workflows, images and ADRs in the
|
|
`AGENTS.md` of their directory (below); rules for working with an agent, including commit
|
|
trailers, are in [ai-assistance.md](ai-assistance.md).
|
|
|
|
## Branches and pull requests
|
|
|
|
- **Work on a branch of your own and open a pull request against `main`; never push to `main`.**
|
|
*Reason:* every change reaches `main` through the Lint and Build checks and a reviewer.
|
|
*Held by:* control: branch protection on `main`.
|
|
- **Do not push to someone else's branch or to a bot's branch; put your change in a pull request of
|
|
your own.** Updating a branch from `main` with Gitea's update button is allowed.
|
|
*Reason:* a push changes a head its author already reviewed or scheduled to merge, and a hand-made
|
|
commit on a `renovate/` branch makes Renovate stop rebasing it.
|
|
*Held by:* aspirational.
|
|
- **File an issue or open a pull request with the headings of the matching template in `.gitea/`,
|
|
also when you file through the API, `tea` or an MCP server.**
|
|
*Reason:* those routes skip the templates, and an agent's built-in body leaves out what review needs.
|
|
*Held by:* review.
|
|
- **A pull request says under *Verified* what you ran (commands, linked CI runs) and under *Not
|
|
verified* what you did not.**
|
|
*Reason:* a reviewer can only judge a change by what was actually checked.
|
|
*Held by:* review.
|
|
|
|
## Commits
|
|
|
|
- **Commit messages follow [Conventional Commits](https://www.conventionalcommits.org/)** (`feat:`,
|
|
`fix:`, `docs:`, `ci:` ...).
|
|
*Reason:* the type tells a reviewer and the changelog what kind of change it is.
|
|
*Held by:* control: the `conventional-pre-commit` commit-msg hook, and the Lint check on every commit
|
|
of a pull request.
|
|
- **Never commit credentials, tokens or key material.**
|
|
*Reason:* a pushed secret has leaked, whatever later commits do.
|
|
*Held by:* control: the `gitleaks` hook, and the Lint check's scan of a pull request's commits.
|
|
|
|
## Changelog, versions and dependencies
|
|
|
|
- **A change a consumer can see needs a changelog fragment in `changelogs/fragments/`**: an
|
|
antsibull-changelog YAML file with one section. A pure CI or docs change needs none, or a `trivial:`
|
|
one. Pick the section by the release it calls for:
|
|
- major: `breaking_changes`, `removed_features`;
|
|
- minor: `minor_changes`, `deprecated_features`;
|
|
- patch: `bugfixes`, `security_fixes`, `known_issues`;
|
|
- never `major_changes` (its title reads like a major release; use `breaking_changes` or
|
|
`minor_changes`).
|
|
|
|
*Reason:* the changelog is built from the fragments, and the next version follows from their sections.
|
|
*Held by:* control for the format (the `antsibull-changelog-lint` hook); review for whether one is
|
|
needed and which section.
|
|
- **Write a fragment, never the version.** The maintainer sets `version` in `galaxy.yml` and tags
|
|
the release.
|
|
*Reason:* the version follows from all fragments since the last release, not from one change.
|
|
*Held by:* review (`galaxy.yml` is under `CODEOWNERS`).
|
|
- **A new Collection dependency states its reason in the pull request and has a version floor.**
|
|
*Reason:* every consumer has to install it, and without a floor an old version nobody tested
|
|
satisfies it.
|
|
*Held by:* review (`galaxy.yml` is under `CODEOWNERS`).
|
|
|
|
## Third-party material
|
|
|
|
- **Third-party material carries an SPDX header, a `REUSE.toml` annotation (which overrides file
|
|
headers) and an entry in `NOTICE`.**
|
|
*Reason:* the Collection is GPL-licensed and REUSE-compliant, so each file's licence and origin must
|
|
be recorded.
|
|
*Held by:* review, prompted by the pull request template's checkbox; the `reuse-lint` hook catches
|
|
a file with no licence at all.
|
|
|
|
## Content from other repositories
|
|
|
|
- **No tracked file, issue or pull request text or comment, release note or job output refers to
|
|
another repository of the maintainer's, its documents, hosts, network or namespaces, or states host
|
|
sizing.** This instruction has no expiry.
|
|
*Reason:* this repository is public and stands alone; a reader without an account must not learn
|
|
the private environment from it.
|
|
*Held by:* aspirational (no check is cheap for issue text or job logs).
|
|
- **When you bring content in from another repository, search the incoming diff before committing**
|
|
for mentions of the source repository, its documents, hostnames, addresses, account namespaces and
|
|
sibling paths; rewrite comments so they stand alone; say in the pull request what you searched for.
|
|
*Reason:* copied comments and paths are where private references slip in.
|
|
*Held by:* review.
|
|
|
|
## Dependency, image and workflow changes
|
|
|
|
The rules for these live next to the files they govern: [scripts/AGENTS.md](../../scripts/AGENTS.md)
|
|
(scripts, their tests, tool pins and their lock, hook SHA pins),
|
|
[images/AGENTS.md](../../images/AGENTS.md) (image inputs, version bumps, pin pull requests, the layer
|
|
limit), [.gitea/workflows/AGENTS.md](../../.gitea/workflows/AGENTS.md) (workflows, secrets, the
|
|
bot-diff gate) and [docs/adr/AGENTS.md](../adr/AGENTS.md) (decision records).
|
|
|
|
- **Test a change to `renovate.json` before the merge with `renovate --platform=local`** (the version
|
|
in `.gitea/workflows/renovate.yml`), which reads your checkout.
|
|
*Reason:* a dry run in Actions (Run workflow with `dry_run=true`) reads `renovate.json` from `main`,
|
|
so it cannot test a pull request's change.
|
|
*Held by:* review (`renovate.json` is under `CODEOWNERS`).
|