This guide covers the contribution workflow, commit conventions, CI pipeline, and release process for the Prebid Sales Agent.
main.main.All contributions are subject to the IPR Policy. Read it before submitting your first pull request. The ipr-agreement.yml GitHub Action checks that contributors have accepted the policy.
Create feature branches from main using a descriptive name:
git checkout main
git pull origin main
git checkout -b feat/add-frequency-capping
Branch name conventions:
| Prefix | Use Case |
|---|---|
feat/ |
New features |
fix/ |
Bug fixes |
docs/ |
Documentation changes |
refactor/ |
Code refactoring |
chore/ |
Maintenance and tooling |
Pull request titles must follow the Conventional Commits format. This is enforced by the pr-title-check.yml GitHub Action – pull requests with non-conforming titles will fail CI.
type(scope): description
| Type | Description | Example |
|---|---|---|
feat |
New feature | feat(catalog): add frequency capping to products |
fix |
Bug fix | fix(media-buy): correct total spend calculation |
docs |
Documentation | docs(api): update tool parameter descriptions |
refactor |
Code refactoring | refactor(adapters): extract common validation logic |
perf |
Performance improvement | perf(search): add index for product name lookups |
chore |
Maintenance | chore(deps): update sqlalchemy to 2.0.30 |
test |
Test additions or changes | test(unit): add coverage for pricing edge cases |
ci |
CI/CD changes | ci: add PostgreSQL 17 to test matrix |
The scope is optional but recommended. Use the module or area being changed (e.g., catalog, media-buy, adapters, auth, admin).
Append ! after the type/scope for breaking changes:
feat(api)!: rename get_products to search_products
The project requires Python 3.12 or later. Use features available in that version, including type parameter syntax and match statements where appropriate.
Use uv for all dependency management:
# Add a runtime dependency
uv add package-name
# Add a development dependency
uv add --dev package-name
# Sync dependencies from pyproject.toml
uv sync
Install pre-commit hooks before your first commit:
./scripts/setup_hooks.sh
The hooks run automatically on each commit and check for:
See Development Environment Setup for the full list of hooks and how to run them manually.
Type hints are required for all public API functions, MCP tool parameters, and return values:
async def create_product(
name: str,
delivery_type: DeliveryType,
cpm: Decimal | None = None,
) -> Product:
...
pytest tests/unit/ -vuv run pre-commit run --all-filespytest tests/integration/ -vInclude in your pull request description:
The project uses GitHub Actions for continuous integration and release automation.
| Workflow | Trigger | Steps |
|---|---|---|
test.yml |
Push to main, PR to main |
Security audit (uv-secure), smoke tests, full test suite with PostgreSQL |
release-please.yml |
Push to main |
Automated versioning, CHANGELOG generation, release creation |
pr-title-check.yml |
PR opened/edited | Validates conventional commit format in PR title |
ipr-agreement.yml |
PR opened | Checks that the contributor has accepted the IPR policy |
The test.yml workflow runs in this order:
uv-secure scans dependencies for known vulnerabilities.@pytest.mark.smoke to catch critical regressions early.If the security audit step fails, check uv-secure output for the affected package and version. Update the dependency or add an exception in the security configuration if the vulnerability does not apply.
Releases are automated through release-please. The tool reads conventional commit messages to determine version bumps and generate changelogs.
main.release-please opens (or updates) a release PR that bumps the version and updates CHANGELOG.md.| Commit Type | Version Bump | CHANGELOG Section |
|---|---|---|
feat |
Minor | Features |
fix |
Patch | Bug Fixes |
perf |
Patch | Performance Improvements |
refactor |
– | Code Refactoring |
docs |
– | Documentation |
chore |
– | Hidden |
Breaking changes (indicated by ! in the commit type) trigger a major version bump regardless of the commit type.
Release-please is configured through release-please-config.json in the repository root. This file controls: