Commit Changes
Create a commit following the project's gitmoji + Conventional Commits conventions (enforced by tools/danger/helpers.ts). This same format applies to commit messages, branch names, and PR titles.
Commit message & PR title format
<emoji> (<scope>) [<TICKET>]: <Description>
<emoji>— one gitmoji from the table below.<scope>— lowercase module/package (e.g.ledger-button,ledger-button-core,ci,release,docs,version).[<TICKET>]—LBD-<number>(uppercase in brackets),NO-ISSUE, orISSUE-<number>. Always include it: Danger only enforces it on PR titles, but the convention is to include it on every commit too so the squash-merge history stays consistent.<Description>— starts with an uppercase letter.
Examples (matching real commits on develop):
✨ (ledger-button-core) [LBD-563]: Add normalizeAddressForCurrency seam
🐛 (ledger-button) [LBD-560]: Resolve token icons via Ledger CDN
🔖 (version) [LBD-369]: Add version plan
🔧 (release) [NO-ISSUE]: Fix build snapshot workflow
👷 (ci) [NO-ISSUE]: Use SONAR_TOKEN secret
Gitmoji table
| Type | Emoji | Code |
|---|---|---|
| Feature | ✨ | :sparkles: |
| Bug fix | 🐛 | :bug: |
| Refactor | ♻️ | :recycle: |
| Documentation | 📝 | :memo: |
| Tests | ✅ | :white_check_mark: |
| Performance | ⚡ | :zap: |
| Breaking change | 💥 | :boom: |
| Chore / config | 🔧 | :wrench: |
| Dependencies | ⬆️ | :arrow_up: |
| Remove code | 🔥 | :fire: |
| Style / format | 🎨 | :art: |
| Types | 🏷️ | :label: |
| CI | 👷 | :construction_worker: |
| Lint fixes | 🚨 | :rotating_light: |
| Version plan | 🔖 | :bookmark: |
How to commit (step by step)
Check staged changes — Run
git statusandgit diff --stagedto understand what will be committed.Gather required information — Ask the user for anything that cannot be inferred:
- Scope: the module/package impacted by the update (e.g.,
ledger-button,test-dapp,docs) - Ticket:
LBD-<number>,ISSUE-<number>, orNO-ISSUE - Description: a brief description of the change (starts with uppercase)
- Type of change: to determine the appropriate emoji
- Scope: the module/package impacted by the update (e.g.,
Create the commit:
git commit -m "<emoji> (<scope>) [<TICKET>]: <Description>"If there are multiple logical changes, create atomic commits for each.
User input shortcut
If the user provides context after the command (e.g., /commit fix login button not responding), use it to:
- Infer the type of change and appropriate emoji
- Extract the description
- Ask only for missing information (like scope if unclear from staged files)
Branch names
Format: <prefix>/<ticket-lowercase>-<kebab-description>
Allowed prefixes (from BRANCH_PREFIX in tools/danger/helpers.ts): feature / feat, bugfix / bug / hotfix / fix, support, chore / core / task, doc, refacto / refactor.
Examples:
feat/lbd-369-add-v2-dapp-config-use-casebugfix/lbd-123-fix-redirectchore/no-issue-bump-eslint
Validation
pnpm commit— interactive commit prompt.pnpm danger:local— validate branch name + commits + PR title locally.- Authoritative regexes live in tools/danger/helpers.ts; human-readable conventions in CONTRIBUTING.md.
Tips
- Keep descriptions concise but descriptive.
- One logical change per commit (atomic commits).