Pull Requests
What a pull request needs before it can merge — tests, docs, description, and CI checks.
3 min read
Anvio's contributing guide (docs/22-contributing.md) lists five steps for contributing, and pull requests are where all five come together:
- Fork and branch from
main - Follow existing code style
- Add tests for new features
- Update docs for architectural changes
- Open a PR with a description and test plan
No PR template file
The repository does not currently ship a .github/PULL_REQUEST_TEMPLATE.md or a .github/PULL_REQUEST_TEMPLATE/ directory. Use the checklist on this page as the de facto template until one exists.
What CI checks on every PR
Every pull request against main triggers the CI GitHub Actions workflow (.github/workflows/ci.yml), which runs four jobs:
| Job | Command | Notes |
|---|---|---|
lint | pnpm lint | turbo run lint across all packages |
typecheck | pnpm typecheck | turbo run typecheck across all packages |
test | pnpm build then pnpm test | Runs with live postgres:16-alpine, redis:7-alpine, and nats:2.10-alpine service containers |
build | pnpm build | Depends on lint, typecheck, and test all passing first |
The test job sets DATABASE_URL, REDIS_URL, NATS_URL, JWT_SECRET, and a placeholder ANTHROPIC_API_KEY=test-key so PostgreSQL/Redis/NATS-backed tests run against real services rather than being skipped. Run the same commands locally before pushing:
pnpm install
pnpm build
pnpm lint
pnpm typecheck
pnpm testIf your change touches a phase integration suite, also run:
pnpm test:integrationBefore you open a PR
- Tests — add unit tests for new logic; add or extend an integration test under
tests/integrationif you're touching a cross-package flow (the codebase's own history is full oftest(pXX): …commits accompanying each feature). - Docs — if the change is architectural (new package, new CLI command, new provider, new config schema), update the relevant file under
docs/(e.g. a newNN-topic.md, or an update to an existing one) in the same PR.docs/22-contributing.mdcalls this out explicitly as a requirement, not a suggestion. - Changelog — for user-visible changes, add an entry under
## [Unreleased]inCHANGELOG.md(see Changelog for the format). Maintainers move it under a versioned heading at release time. - Style — run
pnpm format(Prettier) and make surepnpm lintis clean; see Coding Style for the exact rules. - Scope — keep the PR to one logical change. Split unrelated fixes into separate PRs so they can be reviewed and reverted independently.
Writing the description
Since there's no enforced template, structure your PR description as:
- What — one or two sentences on the change.
- Why — the problem being solved or the doc/roadmap item being closed.
- Test plan — how you verified it: which commands you ran (
pnpm test,pnpm test:integration, manualanvioinvocations), and what you observed.
A description without a test plan is the most common reason a PR gets sent back for more detail — docs/22-contributing.md treats "description and test plan" as a single required deliverable, not two optional ones.
Licensing
Anvio is MIT licensed (see LICENSE). By opening a PR you agree your contribution is provided under the same license.
Last updated on