The process for contributing code works like this:
- Discuss your changes on the crunch-dev mailing list
- Create a JIRA issue unless there isn't one already
- Prepare a patch containing your changes
- Submit the patch by attaching it to the JIRA issue
Pretty simple, right? Let's get to the details.
Discuss your changes
Except for simple, straight forward bug fixes you should discuss any changes you plan to make on the crunch-dev mailing list. Describe the problem to solve and outline the solution if you have one in mind already. Letting us know early makes sure nobody else is working on this and we can also help you with design choices.
Create a JIRA issue
We use JIRA to track all code contributions from non-committers. This way all communication about your contribution stays in one place and you don't have to follow crunch-dev closely.
As soon as you have the green light from crunch-dev, you can create a new JIRA issue unless there is one already. The issue should describe the change you're about to make. We will assign this issue to you if you don't have the privileges to do it yourself.
Prepare a patch
Make sure you have a clean, up to date repository, for example by cloning the public repository:
Create a new branch named like the JIRA issue:
Implement your changes and run the integration test suite to be sure you didn't break anything:
Add all modified and new files to git's index and commit:
Now create the patch:
Of course, you may also split your changes across multiple commits and provide multiple patches. In general, patches should be rather small and focused which makes reviews easier.
For bonus points clone a fresh Crunch repository and make sure your patches apply cleanly:
Submit the patch
Attach your patches to your JIRA issue along with a comment that you're ready for review. We will then check the patch and get back to you, possibly pointing out things that need fixing. You can implement fixes on your branch and create additional patches on top of your existing ones.
When your contribution has been accepted, we will merge the code and set the JIRA issue's status to Resolved.