Working With Wheels
Submitting Pull Requests to Wheels
Submitting Pull Requests to Wheels
Section titled “Submitting Pull Requests to Wheels”This guide provides a step-by-step process for contributing code to Wheels through pull requests (PRs). It covers the entire workflow from setting up your development environment to getting your PR merged into the project.
Prerequisites
Section titled “Prerequisites”Before you start contributing, make sure you have:
- A GitHub account
- Git installed on your local machine
- Docker installed (for running the test environment)
- Basic knowledge of Git commands and GitHub workflows
- Familiarity with Wheels and CFML
Setting Up Your Development Environment
Section titled “Setting Up Your Development Environment”1. Fork the Wheels Repository
Section titled “1. Fork the Wheels Repository”Start by forking the Wheels repository to your own GitHub account:
- Visit https://github.com/wheels-dev/wheels
- Click the “Fork” button in the upper right corner
- Select your GitHub account as the destination
2. Clone Your Fork Locally
Section titled “2. Clone Your Fork Locally”Clone your fork to your local machine:
git clone https://github.com/YOUR-USERNAME/wheels.gitcd wheels3. Add the Upstream Repository
Section titled “3. Add the Upstream Repository”Add the main Wheels repository as an “upstream” remote to keep your fork in sync:
git remote add upstream https://github.com/wheels-dev/wheels.gitSee Using the Test Environment for more detailed instructions.
Contribution Workflow
Section titled “Contribution Workflow”1. Find or Create an Issue
Section titled “1. Find or Create an Issue”Before writing any code, make sure there’s an issue in the GitHub issue tracker:
- Check if an issue already exists for the bug or feature you want to work on
- If not, create a new issue describing the bug or feature
- Wait for feedback from the core team before proceeding
2. Create a Feature Branch
Section titled “2. Create a Feature Branch”Once your issue is approved, create a feature branch in your local repository:
# First, sync your fork with upstreamgit fetch upstreamgit checkout developgit merge upstream/develop
# Create a new branchgit checkout -b feature/issue-NUMBERReplace NUMBER with the issue number from GitHub. Use descriptive branch names:
feature/issue-123for new featuresfix/issue-123for bug fixesdocs/issue-123for documentation updates
3. Make Your Changes
Section titled “3. Make Your Changes”Now you can start coding! Remember to:
- Follow the Code Style Guide
- Add comments where appropriate
- Write tests for your changes
- Keep your changes focused on addressing the specific issue
4. Test Your Changes
Section titled “4. Test Your Changes”Using the Docker Test Environment
Section titled “Using the Docker Test Environment”The Docker test environment allows you to test your changes against multiple CFML engines and databases:
# Start the test environment with specific componentsdocker compose up lucee5 mysql testui -d
# Access the TestUI at http://localhost:3000Running Tests
Section titled “Running Tests”Use the TestUI or run tests directly:
# Run all tests across all engines (from TestUI)# or run specific tests via command line:docker exec -it wheels-test-lucee5 sh -c "cd /wheels-test-suite && box wheels test app"
# Run a specific testdocker exec -it wheels-test-lucee5 sh -c "cd /wheels-test-suite && box wheels test app TestName"Make sure your changes:
- Pass all existing tests
- Include new tests for new functionality
- Work across all supported CFML engines
5. Commit Your Changes
Section titled “5. Commit Your Changes”Once your changes are ready and tested:
git add .git commit -m "fix: description of your changes (fixes #123)"Follow these commit message guidelines:
- Start with a type:
fix:,feat:,docs:,refactor:, etc. - Include a concise description of the changes
- Reference the issue number with
(fixes #123)or(refs #123) - Keep the subject line under 72 characters
- Use the body of the commit message for additional details if needed
6. Push Your Changes
Section titled “6. Push Your Changes”Push your branch to your fork on GitHub:
git push origin feature/issue-1237. Create a Pull Request
Section titled “7. Create a Pull Request”Create a pull request from your branch to the Wheels develop branch:
- Go to your fork on GitHub
- Click the “Compare & Pull Request” button for your branch
- Set the base repository to
wheels-dev/wheelsand the base branch todevelop - Fill out the PR template with:
- A clear description of the changes
- Reference to the issue being addressed
- Any special testing instructions
- Screenshots if applicable (for UI changes)
8. Respond to Review Feedback
Section titled “8. Respond to Review Feedback”After submitting your PR:
- A core team member will review your code
- They may request changes or clarification
- Make any requested changes by pushing additional commits to your branch
- The PR will be automatically updated
9. Update Your PR if Needed
Section titled “9. Update Your PR if Needed”If the develop branch has been updated since you created your PR, you may need to update your branch:
git checkout feature/issue-123git fetch upstreamgit merge upstream/develop# Resolve any conflicts if neededgit push origin feature/issue-123Tips for Successful Pull Requests
Section titled “Tips for Successful Pull Requests”Keep Changes Focused
Section titled “Keep Changes Focused”Each PR should address a single issue or implement a single feature. This makes review easier and reduces the chance of conflicts.
Include Tests
Section titled “Include Tests”Always include tests for your changes:
- For bug fixes, add a test that would fail without your fix
- For new features, add tests covering all functionality
- Make sure all existing tests continue to pass
Update Documentation
Section titled “Update Documentation”If your changes affect user-facing functionality, update the relevant documentation:
- Update guides in the
/docsdirectory - Add inline documentation to code
- Update the CHANGELOG.md if requested
Use the Docker Environment Effectively
Section titled “Use the Docker Environment Effectively”The Docker test environment is a powerful tool for ensuring your changes work across platforms:
- Test on multiple CFML engines (Lucee and Adobe ColdFusion)
- Test with different database engines
- Use the TestUI to run specific tests and view results
Working with the Core Team
Section titled “Working with the Core Team”Communication is Key
Section titled “Communication is Key”Maintain open communication during the PR process:
- Respond promptly to review comments
- Ask questions if requirements are unclear
- Be open to feedback and suggestions
Be Patient
Section titled “Be Patient”The core team members are volunteers with limited time. Review may take some time, especially for complex changes.
Participate in the Community
Section titled “Participate in the Community”While waiting for review, you can:
- Help review other PRs
- Answer questions in the discussions
- Report bugs or improve documentation
After Your PR is Merged
Section titled “After Your PR is Merged”Once your PR is merged:
-
Delete your feature branch
Terminal window git checkout developgit branch -D feature/issue-123 -
Sync your fork with the updated upstream
Terminal window git fetch upstreamgit merge upstream/developgit push origin develop -
Celebrate your contribution to Wheels! 🎉
Special Considerations
Section titled “Special Considerations”Breaking Changes
Section titled “Breaking Changes”If your change introduces breaking changes:
- Clearly indicate this in the PR description
- Explain why the breaking change is necessary
- Document migration paths for users
Performance Considerations
Section titled “Performance Considerations”For changes that might impact performance:
- Include before/after benchmarks if possible
- Test with different load scenarios
- Document any performance implications
Cross-Engine Compatibility
Section titled “Cross-Engine Compatibility”Remember that Wheels supports multiple CFML engines:
- Test on both Lucee and Adobe ColdFusion
- Avoid engine-specific features or provide alternatives
- Use the Docker environment to verify compatibility
Conclusion
Section titled “Conclusion”Contributing to Wheels through pull requests is a rewarding way to improve the framework and help the CFML community. By following this process, you’ll help ensure that your contributions are high-quality, well-tested, and efficiently integrated into the project.
For more information on using the test environment, see Using the Test Environment.