Add repository scaffolding: .gitignore, README, CONTRIBUTING, MIT license, pre-push quality hook, and documentation covering branching, file conventions, and commit style. Establish the main/develop branching strategy. This is project setup only; no application functionality is included.
2.8 KiB
2.8 KiB
Commit Conventions
All commits in newzy follow the Conventional Commits specification. This keeps history readable, machine-parseable, and enables automated changelogs.
Format
<type>[optional scope]: <short description>
[optional body]
[optional footer(s)]
- type (required): what kind of change this is.
- scope (optional): area of the codebase affected, e.g.
reader,feed,ci. - description (required): imperative mood, no trailing period, ≤ 72 chars.
- body (optional): wrap at 72 chars; explain what and why, not how.
- footer (optional):
BREAKING CHANGE:annotations and issue references (Closes #12).
Allowed Types
| Type | Use for |
|---|---|
feat |
New functionality for the user |
fix |
Bug fixes |
docs |
Documentation changes only |
style |
Formatting, whitespace — no behavior change |
refactor |
Code change that neither fixes a bug nor adds a feature |
perf |
Performance improvements |
test |
Adding or correcting tests |
build |
Build system, dependencies, bundlers |
ci |
CI configuration and pipeline changes |
chore |
Maintenance, tooling, housekeeping (e.g. repo setup) |
revert |
Reverting a previous commit |
Sample Commit Messages
chore: initial project setup for newzy
Add repository scaffolding: .gitignore, README, CONTRIBUTING,
MIT license, and documentation for branching, conventions,
and commit style. Establish main/develop branch strategy.
feat(feed): add paginated news feed
Fetches the first page of articles on load and appends
additional pages on scroll. Closes #12.
fix(reader): handle missing article images
Falls back to a placeholder image when an article has no
media, fixing a blank card in the feed.
docs: clarify rebase rules for feature branches
ci: add lint and test checks to pull request workflow
chore(deps): bump vite from 5.2.0 to 5.4.1
BREAKING CHANGE: Node 18 is no longer supported; requires Node 20+.
Rules of Thumb
- One logical change per commit — split unrelated changes.
- Write the description in imperative mood:
add,fix,remove(notadded,fixes,removed). - Reference issues in the footer:
Closes #12,Refs #34. - Mark breaking changes with a
BREAKING CHANGE:footer. - When in doubt about the type,
choreis the safe fallback for housekeeping.