Contributing Guidelines¶
Thank you for your interest in contributing to this project! This document provides guidelines and instructions for contributing.
Table of Contents¶
- Getting Started
- Development Setup
- Contribution Workflow
- Commit Message Guidelines
- Pull Request Process
- Code Style
- Code of Conduct
Getting Started¶
1. Fork the Repository¶
Click the "Fork" button at the top right of the repository page. This creates a copy in your GitHub account.
2. Clone Your Fork¶
3. Add Upstream Remote¶
This allows you to sync your fork with the original repository.
Development Setup¶
1. Install Pre-commit Hooks (Required)¶
Pre-commit hooks ensure code quality before commits:
2. Verify Installation¶
All hooks should pass. If they fail, fix the issues and try again.
3. Create a Feature Branch¶
Branch Naming
Use descriptive branch names that indicate the type of change:
feat/add-authenticationfix/resolve-login-bugdocs/update-readmerefactor/improve-error-handling
Contribution Workflow¶
1. Keep Your Fork Updated¶
Before starting new work, sync with upstream:
2. Make Your Changes¶
- Write clear, concise code
- Follow existing code patterns and conventions
- Add tests if applicable
- Update documentation as needed
- Keep changes focused and atomic
3. Test Your Changes¶
# Run pre-commit hooks
pre-commit run --all-files
# Run any project-specific tests
# (add commands based on your project)
Pre-commit Must Pass
All pre-commit hooks must pass before submitting a PR. This ensures consistent code quality across the project.
4. Commit Your Changes¶
Follow the Commit Message Guidelines:
# Stage specific files
git add file1.js file2.py
# Commit with conventional message
git commit -m "feat(auth): add OAuth2 authentication"
Keep commits:
- Atomic - Each commit should represent a single logical change
- Focused - Don't mix unrelated changes
- Well-described - Use clear, descriptive messages
5. Push to Your Fork¶
6. Create a Pull Request¶
- Go to your fork on GitHub
- Click "Compare & pull request"
- Fill out the pull request template completely
- Link any related issues (e.g., "Closes #123")
- Request review from maintainers
Commit Message Guidelines¶
This project follows Conventional Commits format for automated versioning and changelog generation.
Format¶
Commit Types¶
| Type | Description | Version Impact |
|---|---|---|
feat |
New feature | Minor (0.1.0) |
fix |
Bug fix | Patch (0.0.1) |
docs |
Documentation only | None |
style |
Code style (formatting, etc.) | None |
refactor |
Code refactoring | None |
test |
Adding/updating tests | None |
chore |
Build process, dependencies | None |
ci |
CI/CD configuration | None |
revert |
Reverting a previous commit | None |
Breaking Changes¶
Include BREAKING CHANGE: in the footer or ! after type:
feat(api)!: change response format
BREAKING CHANGE: API responses now return data in camelCase instead of snake_case
This triggers a major version bump (1.0.0).
Examples¶
Feature with Scope¶
feat(auth): add OAuth2 authentication
Implements OAuth2 authentication flow with Google and GitHub providers.
Includes token refresh and logout functionality.
Closes #45
Bug Fix¶
fix(api): resolve null pointer exception in user endpoint
Added null check before accessing user.email property.
Prevents 500 errors when user email is not set.
Documentation¶
docs: update README with installation instructions
Added step-by-step installation guide with prerequisites and troubleshooting section.
Multiple Scopes¶
feat(ui,api): implement user profile page
- Add profile page component in React
- Create GET /api/users/:id endpoint
- Add profile update form with validation
Commit Message Rules¶
- ✅ Subject must start with an alphabetic character
- ✅ Use imperative mood ("add feature" not "added feature")
- ✅ Don't capitalize the first letter of the subject
- ✅ No period at the end of the subject
- ✅ Keep subject line under 72 characters
- ✅ Separate subject from body with a blank line
- ✅ Wrap body at 72 characters
Pull Request Process¶
Before Submitting¶
- [ ] All tests pass
- [ ] Pre-commit hooks pass successfully
- [ ] Documentation is updated
- [ ] Commit messages follow Conventional Commits
- [ ] Branch is up to date with main
Pull Request Requirements¶
- Title Format
- Must follow Conventional Commits format
-
Example:
feat(auth): add OAuth2 authentication -
Description
- Clearly explain what changes were made and why
- Include screenshots for UI changes
-
List any breaking changes
-
Linked Issues
- Use keywords:
fixes #123,closes #456,resolves #789 -
Or:
related to #123,part of #456 -
Checks
- All CI checks must pass (green ✓)
- At least one approval from a maintainer
- No unresolved review comments
Review Process¶
- Initial Review - Maintainers review within a few days
- Feedback - Address feedback by pushing new commits
- Re-review - Request re-review after addressing feedback
- Approval - Maintainer approves the PR
- Merge - PR is merged using "Squash and merge"
Addressing Feedback
When making changes based on review feedback:
After Merging¶
- Delete Branch - Delete your feature branch on GitHub
- Sync Fork - Update your local repository
- Celebrate - You've contributed! 🎉
# Sync your fork
git checkout main
git pull upstream main
git push origin main
# Delete local branch
git branch -d feat/your-feature
Code Style¶
General Rules¶
- Indentation: 2 spaces (enforced by EditorConfig)
- Line Endings: LF (Unix-style)
- Charset: UTF-8
- Trailing Whitespace: Remove (automated by pre-commit)
- Final Newline: Required (automated by pre-commit)
Language-Specific Guidelines¶
- Follow PEP 8
- Use type hints where appropriate
- Maximum line length: 88 characters (Black formatter)
- Use docstrings for functions and classes
- Use Standard/Prettier formatting
- Prefer
constandletovervar - Use arrow functions for callbacks
- Add JSDoc comments for public APIs
- 2-space indentation
- No tabs
- Use
---document separator - Quote strings when necessary
- Use reference-style links for readability
- One sentence per line
- Use fenced code blocks with language specifiers
- Follow markdownlint rules
Code of Conduct¶
Our Standards¶
We are committed to providing a welcoming and inclusive environment:
- ✅ Be respectful and professional
- ✅ Welcome newcomers and help them learn
- ✅ Accept constructive criticism gracefully
- ✅ Focus on what's best for the community
- ✅ Show empathy towards other contributors
Unacceptable Behavior¶
- ❌ Harassment, discrimination, or abuse
- ❌ Trolling, insulting comments, or personal attacks
- ❌ Publishing others' private information
- ❌ Other conduct that could reasonably be considered inappropriate
Enforcement¶
Violations may result in:
- Warning from maintainers
- Temporary or permanent ban from the project
- Reporting to GitHub
Questions or Need Help?¶
- Questions - Open a Discussion
- Bug Reports - Open an Issue
- Feature Requests - Open an Issue
- Security Issues - See our Security Policy
License¶
By contributing, you agree that your contributions will be licensed under the same license as the project. See LICENSE for details.
Thank you for contributing! Your efforts help make this project better for everyone. 🙏