-
-
Notifications
You must be signed in to change notification settings - Fork 0
Contributing Guide
Thank you for your interest in contributing to DevStack Core! This document provides guidelines and instructions for contributing to this project.
- Code of Conduct
- Getting Started
- How to Contribute
- Development Workflow
- Pull Request Process
- Coding Standards
- Testing
- Documentation
This project adheres to a Code of Conduct that all contributors are expected to follow. Please read CODE_OF_CONDUCT.md before contributing.
- Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/devstack-core.git cd devstack-core -
Set up the development environment:
cp .env.example .env # Edit .env with appropriate values ./devstack.sh start
To enable authenticated Git operations and commit signing with the local Forgejo instance:
-
Display your public key:
cat ~/.ssh/id_ed25519.pub # Or: cat ~/.ssh/id_rsa.pub
-
Add to Forgejo:
- Navigate to http://localhost:3000
- Sign in to your account
- Go to Settings → SSH / GPG Keys
- Click "Add Key" under SSH Keys
- Paste your public key
- Give it a descriptive name (e.g., "Mac Development Key")
- Click "Add Key"
-
List your GPG keys:
gpg --list-secret-keys --keyid-format LONG
-
Export your public key:
# Replace KEY_ID with your key ID from the previous command gpg --armor --export KEY_ID -
Add to Forgejo:
- Navigate to Settings → SSH / GPG Keys
- Click "Add Key" under GPG Keys
- Paste the entire GPG public key block (including BEGIN/END lines)
- Click "Add Key"
# Set your GPG key for signing commits
git config --global user.signingkey YOUR_KEY_ID
# Enable automatic commit signing
git config --global commit.gpgsign trueAdd to your ~/.ssh/config:
Host forgejo
HostName localhost
Port 2222
User git
IdentityFile ~/.ssh/id_ed25519
Then you can clone and push using:
git clone forgejo:username/repo.gitBefore creating bug reports, please check existing issues to avoid duplicates. When creating a bug report, include:
- Clear title and description
- Steps to reproduce the issue
- Expected vs actual behavior
- Environment details: OS version, Colima version, Docker version
-
Relevant logs from
./devstack.sh logsor Docker logs - Screenshots if applicable
Enhancement suggestions are welcome! Please include:
- Clear use case - Why is this enhancement needed?
- Proposed solution - How should it work?
- Alternatives considered - What other approaches did you think about?
- Impact - Who benefits and how?
We welcome code contributions! Here are the types of contributions we're looking for:
- Bug fixes
- New service integrations
- Performance improvements
- Documentation improvements
- Test coverage improvements
- Security enhancements
-
Create a branch for your work:
git checkout -b feature/your-feature-name # or git checkout -b fix/issue-description -
Make your changes:
- Follow the coding standards below
- Add tests if applicable
- Update documentation as needed
-
Test your changes:
# Start fresh environment ./devstack.sh stop ./devstack.sh clean ./devstack.sh start # Run tests ./scripts/run-tests.sh # Verify health ./devstack.sh health
-
Commit your changes:
git add . git commit -m "Type: Brief description More detailed explanation if needed. Fixes #issue_number"
Commit message types:
-
feat:- New feature -
fix:- Bug fix -
docs:- Documentation changes -
refactor:- Code refactoring -
test:- Adding or updating tests -
chore:- Maintenance tasks
-
-
Push to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request on GitHub
-
Update documentation - Ensure README.md and relevant docs are updated
-
Update CHANGELOG - Add entry describing your changes (if applicable)
-
Ensure tests pass - All existing tests should pass
-
Add tests - For new functionality, add appropriate tests
-
Clean commits - Squash commits if needed for clarity
-
Descriptive PR - Include:
- What changes were made
- Why these changes were needed
- How to test the changes
- Screenshots/logs if applicable
- Related issue numbers
-
Review process:
- Maintainers will review your PR
- Address any requested changes
- Once approved, a maintainer will merge your PR
- Use
bash(notsh) - Include shebang:
#!/bin/bash - Use 4-space indentation
- Quote variables:
"$VARIABLE" - Use
[[instead of[for conditionals - Add comments for complex logic
- Use functions for reusable code
- Check exit codes:
|| { error "Failed"; exit 1; }
- Use version 3.8+ syntax
- Include health checks for all services
- Use explicit image tags (not
latest) - Document environment variables
- Use secrets for sensitive data
- Add resource limits when appropriate
- Include descriptive labels
- Use clear, descriptive names
- Include comments explaining purpose
- Document all options
- Provide sensible defaults
- Use environment variables for flexibility
- Use clear, concise language
- Include code examples
- Add screenshots for UI elements
- Keep line length under 100 characters
- Use proper markdown formatting
- Update table of contents when adding sections
Before submitting a PR, verify:
-
Clean installation works:
./devstack.sh clean ./devstack.sh start
-
All services start healthy:
./devstack.sh health
-
Vault operations work:
./devstack.sh vault-init ./devstack.sh vault-bootstrap
-
Service-specific tests:
./scripts/run-tests.sh
-
No regressions:
- Test existing functionality still works
- Check logs for errors:
./devstack.sh logs
- Add tests for new features
- Update tests for modified functionality
- Include both positive and negative test cases
- Test error handling and edge cases
- New features - How to use them, why they're useful
- Configuration changes - New options, changed defaults
- Breaking changes - Migration guides, deprecation notices
- Architecture changes - Design decisions, tradeoffs
- Troubleshooting - Common issues and solutions
- README.md - Main documentation, getting started, overview
- Code comments - Complex logic, non-obvious decisions
- Commit messages - What and why
- PR descriptions - Changes, testing, review notes
- Issue tracker - Bug reports, feature requests, discussions
- Open an issue with the
questionlabel - Check existing issues and documentation
- Review closed issues for similar questions
Contributors will be recognized in:
- GitHub contributors list
- CHANGELOG.md for significant contributions
- Special thanks in release notes
Thank you for contributing to DevStack Core!