From f9be9ead200a72fb9a3154b98a34bc361313563c Mon Sep 17 00:00:00 2001 From: Anthony Torres Date: Fri, 29 May 2026 09:29:19 -0600 Subject: [PATCH] docs: document contributor naming standards --- CONTRIBUTING.md | 30 ++++++++++++++++++++++++++++++ docs/contributor-guide.md | 24 +++++++++++++++++++----- 2 files changed, 49 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 457689f2f..688568ff9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,6 +28,36 @@ Thanks for contributing to StellarYield, a Stellar-native DeFi yield aggregator Issues with `status: needs-update` for more than 14 days may be re-opened for others. +### 🌿 Branch, Commit, and PR Naming + +Use short, descriptive names that include the issue number when possible. + +**Branches** + +| Work type | Branch example | +|-----------|----------------| +| Feature | `feat/issue-540-contributor-naming` | +| Bug fix | `fix/issue-612-apy-rounding` | +| Docs | `docs/issue-540-pr-naming-guide` | +| Refactor | `refactor/issue-618-vault-service` | + +**Commits** + +Follow the conventional commit style: + +```text +feat: add APY comparison export +fix: handle missing vault metadata +docs: document contributor PR naming +refactor: simplify yield route scoring +``` + +**Pull requests** + +- Include the issue number in the title when it fits, for example `docs: document contributor naming standards (#540)`. +- Add `Closes #`, `Fixes #`, or `Resolves #` in the PR body so GitHub links and closes the issue on merge. +- Keep one PR focused on one issue unless a maintainer asks you to combine related work. + ### 💻 Local Setup Since StellarYield is a full-stack monorepo, ensure you have the correct environments set up for the stack you are touching: diff --git a/docs/contributor-guide.md b/docs/contributor-guide.md index 321c1bb96..f523660be 100644 --- a/docs/contributor-guide.md +++ b/docs/contributor-guide.md @@ -281,12 +281,14 @@ git fetch upstream git checkout -b feat/issue--short-description upstream/main ``` -Examples: +Use a prefix that matches the type of work: -| Issue | Branch name | -|-------|------------| -| `#559` – contributor guide | `feat/issue-559-wave-contributor-docs` | -| `#611` – correlation middleware | `feat/issue-611-correlation-id-middleware` | +| Work type | Branch name | +|-----------|-------------| +| Feature | `feat/issue-611-correlation-id-middleware` | +| Bug fix | `fix/issue-612-apy-rounding` | +| Docs | `docs/issue-540-pr-naming-guide` | +| Refactor | `refactor/issue-618-vault-service` | For PRs that address multiple related issues at once, list all numbers: @@ -294,6 +296,18 @@ For PRs that address multiple related issues at once, list all numbers: feat/issues-545-549-share-price-chart-and-manifest ``` +Use conventional commit messages so reviewers can scan history quickly: + +```text +feat: add APY comparison export +fix: handle missing vault metadata +docs: document contributor PR naming +refactor: simplify yield route scoring +``` + +PR titles should be short and include the issue number when it fits, for example +`docs: document contributor naming standards (#540)`. + ### 5. Linking the issue in your PR The PR body **must** include a closing keyword so GitHub (and Drips) can