Contributing to Payflow API¶
Thank you for participating in the evolution of the Payflow API payment backend!
This guide outlines our development workflow, pull request expectations, quality gates, and repository standards.
1. Development Workflow¶
- Fork & Clone: Clone the repository locally.
- Branch Naming: Create a topic branch following our convention:
feat/phase-<num>-<short-description>for new featuresfix/<short-description>for bug fixesdocs/<short-description>for documentation updates- Local Build & Quality Check: Before opening a PR, ensure code formatting, static analysis, and tests pass:
2. Code Quality Gates & Automated Checks¶
Every pull request triggers the GitHub Actions CI pipeline, which enforces strict quality gates:
- Formatting Check (
Spotless): Validates code layout against Eclipse/Java format rules (mvn spotless:check). - Static Analysis (
Checkstyle): Ensures compliance with naming, import, and structural standards (mvn checkstyle:check). - Compilation & Test Suite: Verifies clean compilation on Java 25 and executes all unit and integration tests.
Note: PRs with failing CI checks, unformatted code, or lint violations will not be merged.
3. Conventional Commit Guidelines¶
We enforce the Conventional Commits specification for clean git history:
- Format:
<type>(<scope>): <short summary in imperative mood> - Allowed Types:
feat: A new feature or endpoint implementationfix: A bug fix in existing logicdocs: Documentation changes (README, architecture guide, specs)style: Formatting changes that do not affect code logicrefactor: Code reorganization without functional changestest: Adding or refactoring testschore: Updating dependencies, build scripts, or configuration- Examples:
feat(domain): replace Double balance with BigDecimal in User entityfix(locking): sort user UPI IDs alphabetically to prevent deadlock
4. Pull Request Requirements¶
- Scoped Changes: Keep PRs small and aligned with a single sub-phase (target: <500 net lines of code).
- Documentation Parity: If changing API contracts, business logic, or configuration parameters, update
README.md,docs/ARCHITECTURE.md, anddocs/API_SPECIFICATION.mdwithin the same PR. - Changelog Entry: Add a concise entry under
[Unreleased]inCHANGELOG.md.
5. Recommended Repository Branch Protection Rules¶
For repository maintainers, configure GitHub branch protection for main:
- Require a pull request before merging.
- Require status checks to pass before merging: Select
Build, Quality Audit & Test. - Require linear history (squash or rebase merging preferred).