Thank you for your interest in contributing to Linearator! This guide will help you get started with development and understand our workflow conventions.
- Development Setup
- Commit Scopes
- Commit Message Format
- Commit Types
- Branch Naming
- Making Changes
- Pull Request Guidelines
- Code Quality Standards
- Testing Requirements
- Review Process
- Python 3.12 or higher
- Git
- pip and virtualenv
- Clone the repository:
git clone https://github.com/AdiKsOnDev/linearator.git
cd linearator- Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate- Install development dependencies:
make install-dev- Install pre-commit hooks:
make setup-hooksmake test- Run all testsmake test-cov- Run tests with coverage reportmake lint- Run linting checks (ruff, mypy)make format- Format code with ruffmake security-check- Run security checks (bandit)make dev- Format, lint, and test (quick workflow)make ci- Simulate CI/CD pipeline locally
When making commits, use these predefined scopes in your conventional commit messages. Scopes represent specific areas of the codebase.
api- Core Linear API client and GraphQL queriesauth- Authentication, OAuth flow, and credential storage
cli- Main CLI application and command infrastructure
issue- Issue management commands (create, list, update, delete)project- Project management and status updatesmilestone- Milestone operations and project-scoped milestonesteam- Team operations and member managementuser- User management and workload analysislabel- Label creation and managementsearch- Search functionality and filtersbulk- Bulk operations (assignments, state updates, labels)interactive- Interactive mode and guided workflows
config- Configuration management and file handlingformat- Output formatters (table, JSON, YAML)
test- Test suite, fixtures, and test utilitiesdocs- Documentation (README, CHANGELOG, guides)ci- CI/CD pipelines and GitHub Actionsbuild- Build system, packaging, and distributiondeps- Dependency updates and management
security- Security fixes and vulnerability patcheslint- Linting configuration and fixestypes- Type annotations and mypy complianceperf- Performance optimizations
We follow the Conventional Commits specification:
<type>(<scope>): <subject>
[optional body]
[optional footer(s)]
- Subject line: Maximum 50 characters
- Subject style: Imperative mood ("add" not "added" or "adds")
- No capitalization: Start with lowercase letter
- No period: Don't end subject with a period
- Body: Wrap at 72 characters (if included)
- Separate: Blank line between subject and body
- Explain what and why: Not how (code shows how)
For breaking changes, add ! after the type/scope:
feat(api)!: change authentication method signature
BREAKING CHANGE: The authenticate() method now requires
a context parameter as the first argument.
Good commits:
feat(issue): add milestone assignment during creation
fix(auth): resolve keyring warning on systems without backend
docs(readme): add project structure section
test(milestone): add comprehensive unit test coverage
refactor(api): extract state resolution to helper function
perf(search): optimize GraphQL query for large result sets
Bad commits:
fixed bug # Missing type, scope, description
Added new feature. # Capitalized, has period
feat: Updates to the API client # Capitalized, vague
fix(issue) Fixed the thing # Missing colon, capitalized
Use these types for all commits:
feat- New feature for the userfix- Bug fix for the userdocs- Documentation only changesstyle- Formatting, missing semicolons (no code change)refactor- Code change that neither fixes a bug nor adds a featureperf- Code change that improves performancetest- Adding or correcting testsbuild- Changes to build system or dependenciesci- Changes to CI configuration and scriptschore- Other changes that don't modify src or test filesrevert- Reverts a previous commit
Follow this branch naming convention:
<type>/<short-description>
feat/- New featuresfix/- Bug fixesdocs/- Documentation changesrefactor/- Code refactoringtest/- Test additions or modificationschore/- Maintenance tasks
- Use lowercase letters only
- Separate words with hyphens
- Keep names short but descriptive
- Avoid special characters
Good branch names:
feat/milestone-management
fix/auth-keyring-warnings
docs/contributing-guide
refactor/state-resolution
test/project-api-coverage
chore/update-dependencies
Bad branch names:
new-feature # Missing type prefix
feat/Add_New_Feature # Uppercase, underscores
fix-bug # Missing slash separator
feat/implement-the-new-milestone-management-system-with-complete-testing # Too long
git checkout -b feat/your-feature-name- Write clean, readable code
- Follow existing code style
- Add tests for new functionality
- Update documentation as needed
# Run tests
make test
# Run linting
make lint
# Run security checks
make security-check
# Run full CI simulation
make ci# Stage changes
git add .
# Commit with conventional commit message
git commit -m "feat(scope): add new feature"# Push to your fork
git push origin feat/your-feature-name
# Create pull request on GitHubUse the same format as commit messages:
<type>(<scope>): <description>
## Summary
Brief description of what this PR does
## Changes
- Change 1
- Change 2
- Change 3
## Testing
- [ ] All tests pass
- [ ] Added tests for new functionality
- [ ] Manually tested changes
## Documentation
- [ ] Updated README if needed
- [ ] Updated CHANGELOG
- [ ] Added/updated docstrings
## Checklist
- [ ] Code follows project style guidelines
- [ ] All tests pass locally
- [ ] No linting errors
- [ ] Security checks pass
- [ ] Breaking changes documentedEnsure your PR meets these requirements:
- ✓ All tests pass (
make test) - ✓ Code is properly formatted (
make format) - ✓ No linting errors (
make lint) - ✓ Security checks pass (
make security-check) - ✓ Test coverage is maintained or improved
- ✓ Documentation is updated
- ✓ CHANGELOG.md is updated (for notable changes)
- ✓ Commits follow conventional commit format
- ✓ Branch name follows naming convention
- Formatter: ruff (automatically applied)
- Line Length: 88 characters
- Import Sorting: Automated with ruff
- Type Hints: Required for all functions
- Type Checker: mypy
- Requirement: 100% mypy compliance
- Configuration: Strict type checking enabled
- Rules:
- All functions must have type annotations
- No
Anytypes unless absolutely necessary - Proper generic type parameters
- Scanner: bandit
- Requirement: Zero high/medium severity issues
- Rules:
- No hardcoded secrets
- Safe subprocess usage
- Proper exception handling
- Secure serialization (JSON, not pickle)
- Keep functions focused and simple
- Extract complex logic into helper functions
- Maximum cyclomatic complexity: 10
- Use meaningful variable names
- Minimum Coverage: 80%
- Target Coverage: >90%
- Requirement: All new features must include tests
- Unit Tests: Test individual functions and classes
- Integration Tests: Test component interactions
- End-to-End Tests: Test complete workflows
def test_feature_description():
"""Test that feature behaves correctly under normal conditions."""
# Arrange
input_data = setup_test_data()
# Act
result = function_under_test(input_data)
# Assert
assert result == expected_output# Run all tests
make test
# Run with coverage
make test-cov
# Run unit tests only
make test-unit
# Run integration tests only
make test-integration- Automated Checks: CI/CD pipeline runs tests, linting, and security checks
- Code Review: Maintainers review code quality and design
- Feedback: Reviewers may request changes or ask questions
- Iteration: Make requested changes and push updates
- Approval: Once approved, PR will be merged
Reviewers will check:
- ✓ Code quality and readability
- ✓ Test coverage and quality
- ✓ Documentation completeness
- ✓ Security considerations
- ✓ Performance implications
- ✓ Breaking change impact
- ✓ Consistency with existing code
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Questions: Open a discussion or comment on your PR
- CLI Framework: Click
- API Client: GQL (GraphQL)
- HTTP: aiohttp, httpx
- Authentication: keyring, cryptography, PyJWT
- Output: rich (formatting)
- Configuration: python-dotenv, tomli/tomli-w
- Testing: pytest, pytest-cov, pytest-asyncio, pytest-mock
- Linting: ruff, mypy
- Security: bandit, safety
- Pre-commit: pre-commit hooks
- Minimum: Python 3.12
- Tested: Python 3.12, 3.13
Thank you for contributing to Linearator! Your contributions help make this tool better for everyone.