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.
3.4 KiB
Contributing to newzy
Thank you for considering a contribution to newzy! This document explains how to set up your environment, follow the branching model, write commits, and submit changes.
Ground Rules
Please keep the following in mind:
- Be respectful and constructive in all discussions and code reviews.
- Keep pull requests focused — one logical change per PR.
- Never commit secrets, credentials, or
.envfiles (see.gitignore). - Follow the existing style and conventions before introducing new patterns.
Prerequisites
-
Git with your name and email configured:
git config --global user.name "Your Name" git config --global user.email "you@example.com" -
A Gitea account with access to the repository.
Git Hooks
newzy ships versioned hooks in hooks/ (currently a pre-push hook that runs code quality checks). Enable them once per clone:
git config core.hooksPath hooks
The hook is a no-op until the application toolchain (package.json) exists; afterwards it runs the lint and test scripts (if defined) before every push.
Branching Model
newzy uses a main / develop branching model:
| Branch | Purpose | Lives in |
|---|---|---|
main |
Production-ready code, stable releases | Always |
develop |
Integration branch for feature development | Always |
feature/* |
New features and enhancements (from develop) |
Temporary |
bugfix/* |
Bug fixes (from develop) |
Temporary |
hotfix/* |
Critical fixes for production (from main) |
Temporary |
Detailed rules, including merge and rebase workflows, are in docs/branching.md.
Typical Workflow
# Start from an up-to-date develop
git checkout develop
git pull --rebase origin develop
# Create your feature branch
git checkout -b feature/reader-view
# Commit your work (Conventional Commits)
git commit -m "feat: add reader view for articles"
# Rebase onto latest develop to keep history linear
git rebase develop
# Push and open a pull request against develop
git push -u origin feature/reader-view
Commit Conventions
All commit messages follow the Conventional Commits format:
<type>: <short description>
[optional body]
[optional footer]
Allowed types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert.
See docs/commits.md for the full format and sample messages.
Code Review Process
- Push your branch and open a pull request against
develop(ormainforhotfix/*). - Ensure the CI checks pass.
- At least one approval is required before merging.
- Squash-merge feature branches into
developso each feature is a single commit. - Delete the source branch after merging.
Releasing
Releases are cut from main only. The release process is:
- Merge
developintomain(merge commit, no squash). - Tag the commit:
git tag -a v1.0.0 -m "Release v1.0.0". - Push the tag:
git push origin v1.0.0. - Back-merge
mainintodevelopto keep them in sync.
Questions?
Open a discussion or issue in the repository if anything in this document is unclear or outdated.