Contributions are welcome to all Apache Fluo repositories (Fluo, Fluo Recipes) and the Fluo project website. All repositories follow a review-then-commit process. This means that all contributions must pass any integration tests and be reviewed before being committed. Code reviews are done by commenting on a GitHub pull request.
- Make sure you have a fork of the repository (Fluo, Fluo Recipes, Fluo Website) that you want contribute to.
- Create an issue that describes the work. Each Fluo repository has its own issue tracker: Fluo, Fluo Recipes, Fluo Website
Create a branch in the local clone of your fork. An example branch name is
fluo-301which describes the repo and issue number.
git checkout -b fluo-301
- Do work and commit to your branch.
If your branch becomes stale, rebase it to master.
# checkout master git checkout master # pull latest commits from upstream git pull upstream master # checkout your branch git checkout fluo-301 # rebase master to bring latest commits into your branch # follow any insructions to resolve conflicts git rebase master # update your branch on your fork git push -f origin fluo-301
- When you are ready to create a pull request, squash to the minimum number of commits. For help on squashing commits, see this tutorial or StackOverflow answer.
Push your branch
fluo-301to your fork
# add -f to command below if you squashed commits # and previously pushed branch to your fork git push origin fluo-301
- Create a pull request on the GitHub page of the repo (e.g. Fluo, Fluo Recipes, Fluo Website) that you want to contribute to. The pull request should merge your branch (e.g.
fluo-301) in your fork into the master branch of the repo.
- At least one committer (and others in the community) will review your pull request and add any comments to your code.
- Reviewers should make comments at bottom of the pull request or in “Files Changed”. Avoid commenting on commits as these comments will disappear if the branch is rebased as rebasing generates new commits for the pull request.
- Push any changes from the review to the branch as new commits so the reviewer only needs to review new changes.
- Repeat this process until a reviewer comments with a +1.
- When the review process is finished, all commits on the branch of the pull request should be squashed into the minimum number of commits by the developer. The reviewer should then merge the pull request.
Make sure your imports look like the block below:
java. javax. <blank line> <all other non-static imports in alphabetical order> <blank line> <static imports in alphabetical order>
This can be configured by common IDEs:
Window -> Preferences -> Java -> Organize Imports
Preferences -> Code Style -> Java -> Imports