Contribution - GiraffaFS/giraffa GitHub Wiki

How to Contribute

First of all, please star this project on the homepage, and then check the current set of issues we are working on.

If you find an issue that you would like to work on, or if you created your own, then please clone our repository using git. You can find out the commands and such needed to make a clone here.

As always, please be careful with commits. It is advised that you use git diff --no-prefix to create a patch first and then upload it to the issue you were working on for code review and further committing.

Please keep in touch via emails.

Sharing Code Changes

GitHub issues does not support attaching patches. Share your code changes via use pull requests. The general workflow is as follows.

  1. Be sure to set up the pre-commit hook.
  2. Create a branch in your local git repo for the issue you are working on.
    git checkout -b issue-123
    and work on it on your changes.
  3. When done push your branch issue-123 to the remote repo. If you are not a committer push the branch to a cloned repo.
  4. Submit a pull request:
    Go to "Pull requests" and click on "New pull request"
    Choose the branch you have been working on on the right and "Create pull request".
    In the comment field enter "Link to #123". This will link your pull request to Issue 123. Check that it did.
  5. When reviewing the pull request post your comments on the underlying issue rather than at the pull request itself.
  6. If more changes needed update your branch issue-123 and push changes to the remote repo again.
  7. Make sure you commit to remote only if your pull request has been reviewed and +1'd.
  8. When ready to commit, DO NOT use automated merge button. This will create duplicate commits.
    Instead use: git merge --no-commit --squash issue-123
    If there were multiple commits on the branch make sure to squash them into one.
    Make sure to format the final commit message correctly:
    Issue ###: <Description>. (<Authors>)
  9. Then push trunk to the remote.
  10. Close the issue, thanking the contributor.
  11. You should clean up (remove) the remote branch issue-123 after committing:
    git push origin :issue-123

Configuring pre-commit hook

We encourage contributors to set up the following pre-commit hook. GitHub does not support hooks on the server side. The hook will ensure uniform commit messages from everybody. In your clone of giraffa repository create file .git/hooks/commit-msg and add the following contents into it:

#!/bin/sh

msg=$(<$1)
pattern="^Issue\ [0-9]+\:\ .+\.\ \(.+\)"
if [[ ! "$msg" =~ $pattern ]]
then
  echo "The commit message format should be 'Issue <NUMBER>: <DESCRIPTION>. (<AUTHORS>)'
Example: 'Issue 50: Move row key cache into RowKeyFactory. (Plamen, shv)'"
  exit 1
fi

Git commands to commit changes (comitters only):

  1. Make sure you are in the working directory.
  2. In Git, make a local commit first, and look it over using the command: git commit -a. If any proposed changes look odd or not what you intended, leave your commit header empty to abort the commit and try again when you've fixed your issues.
  3. If the commit goes through, you can push to the repository here by doing the command: git push origin trunk. It will ask for your password. After, it will push your changes from your local Git repository to here and you will be done!

Nightly Builds

We have continous integration hosting via Jenkins, courtesy of FOSS@CloudBees, here.
Currently we build, test, and document, every noon and midnight.

If you are curious about the API, you can check out our Javadoc here.

We also have a free Clover license, courtesy of Atlassian, here.

⚠️ **GitHub.com Fallback** ⚠️