Thank you for your interest in contributing! This document provides guidelines for contributing to this project.
Before creating an issue, please:
- Check existing issues to avoid duplicates
- Use the issue template (if available)
- Provide detailed information:
- Proxmox VE version
- Container OS and version
- Error messages and logs
- Steps to reproduce
Enhancement suggestions are welcome! Please:
- Check if the enhancement is already requested
- Clearly describe the feature and its benefits
- Provide use cases and examples
- Consider backward compatibility
- Proxmox VE test environment
- Git installed
- Basic bash scripting knowledge
- Understanding of LXC containers
# Fork the repository on GitHub
# Clone your fork
git clone https://github.com/YOUR_USERNAME/lxc-auto-scaler.git
cd lxc-auto-scaler
# Create a branch for your changes
git checkout -b feature/your-feature-name
# Make your changes
# Test thoroughly in a Proxmox environment
# Commit your changes
git add .
git commit -m "Description of changes"
# Push to your fork
git push origin feature/your-feature-name
# Create a Pull Request on GitHub- Use shellcheck for linting
- Follow community-scripts patterns where applicable
- Add comments for complex logic
- Use meaningful variable names
- Handle errors properly with error messages
# Good - descriptive function name with comments
detect_lxc_containers() {
# Get all LXC containers except the one being created
DETECTED_LXC=$(pct list 2>/dev/null | awk 'NR>1 {print $1}')
}
# Bad - unclear purpose
get_stuff() {
X=$(pct list | awk 'NR>1 {print $1}')
}Use community-scripts message functions:
msg_info "Informational message"
msg_ok "Success message"
msg_error "Error message"Before submitting a PR, test:
-
Fresh Installation
- Default mode installation
- Advanced mode installation
- Different storage backends
-
Locale Selection
- English installation
- Turkish installation
-
Container Detection
- With existing containers
- Without existing containers
-
Web Interface
- UI accessibility
- API endpoints
- Log viewing
-
Service Management
- Service starts correctly
- Logs are generated
- Configuration is valid
- Clean Proxmox VE installation
- At least 2 existing LXC containers for detection testing
- Network connectivity for package downloads
-
Update Documentation
- Update README.md if adding features
- Add comments to complex code
- Update CHANGELOG.md (if exists)
-
Follow Commit Message Format
type: brief description Detailed explanation of changes - Bullet point 1 - Bullet point 2Types:
feat,fix,docs,style,refactor,test,chore -
PR Description Template
## Description Brief description of changes ## Type of Change - [ ] Bug fix - [ ] New feature - [ ] Documentation update - [ ] Code refactoring ## Testing Done - [ ] Fresh installation tested - [ ] Locale selection tested - [ ] Web UI tested - [ ] Service functionality tested ## Related Issues Fixes #123
-
Review Process
- Maintainer will review your PR
- Address any feedback
- Once approved, PR will be merged
To add a new language:
- Add locale option in
select_locale()function - Update locale installation in install script
- Test locale generation
- Update documentation
Example:
select_locale() {
LOCALE_CHOICE=$(whiptail --menu "Choose locale:" 12 50 3 \
"1" "English (en_US.UTF-8)" \
"2" "Turkish (tr_TR.UTF-8)" \
"3" "German (de_DE.UTF-8)" \ # New locale
3>&1 1>&2 2>&3)
case $LOCALE_CHOICE in
3)
SELECTED_LOCALE="de_DE.UTF-8"
LOCALE_NAME="German"
;;
esac
}The web UI is located in the install script as fallback HTML. To enhance:
- Maintain dark theme consistency
- Keep mobile-responsive design
- Test API endpoints
- Ensure accessibility
When adding UI features:
- Keep JavaScript vanilla (no frameworks)
- Maintain current design language
- Add proper error handling
- Update API endpoints if needed
Keep README updated with:
- New features
- Configuration changes
- New requirements
- Updated examples
Add comments for:
- Complex logic
- Non-obvious decisions
- Important variables
- Function purposes
- Open a discussion on GitHub
- Review existing documentation
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to LXC AutoScale Installer! 🎉