2015-06-26 17:38:35 -04:00
|
|
|
# Guidelines for Contributing
|
2016-06-08 03:59:08 -04:00
|
|
|
|
2012-11-14 14:40:13 -05:00
|
|
|
Contributions from the community are essential in keeping Hibernate (any Open Source
|
|
|
|
project really) strong and successful. While we try to keep requirements for
|
|
|
|
contributing to a minimum, there are a few guidelines we ask that you mind.
|
|
|
|
|
|
|
|
## Getting Started
|
2016-06-08 03:59:08 -04:00
|
|
|
|
2012-11-14 14:40:13 -05:00
|
|
|
If you are just getting started with Git, GitHub and/or contributing to Hibernate via
|
|
|
|
GitHub there are a few pre-requisite steps.
|
|
|
|
|
2015-06-26 17:38:35 -04:00
|
|
|
* Make sure you have signed a [Contributor License Agreement](https://cla.jboss.org) (CLA) for the Hibernate project
|
|
|
|
* Make sure you have a [Hibernate JIRA account](https://hibernate.atlassian.net)
|
2012-11-14 14:40:13 -05:00
|
|
|
* Make sure you have a [GitHub account](https://github.com/signup/free)
|
2016-01-17 04:44:22 -05:00
|
|
|
* [Fork](https://help.github.com/articles/fork-a-repo) the Hibernate repository. As discussed in
|
2012-11-14 14:40:13 -05:00
|
|
|
the linked page, this also includes:
|
|
|
|
* [Set](https://help.github.com/articles/set-up-git) up your local git install
|
|
|
|
* Clone your fork
|
2013-05-01 15:00:49 -04:00
|
|
|
* See the wiki pages for setting up your IDE, whether you use [IntelliJ IDEA](https://community.jboss.org/wiki/ContributingToHibernateUsingIntelliJ)
|
|
|
|
or [Eclipse](https://community.jboss.org/wiki/ContributingToHibernateUsingEclipse).
|
2012-11-14 14:40:13 -05:00
|
|
|
|
|
|
|
## Create the working (topic) branch
|
2016-06-08 03:59:08 -04:00
|
|
|
|
2013-05-01 15:00:49 -04:00
|
|
|
Create a [topic branch](http://git-scm.com/book/en/Git-Branching-Branching-Workflows#Topic-Branches) on which you
|
2015-06-26 17:38:35 -04:00
|
|
|
will work. The convention is to name the branch using the JIRA issue key. If there is not already a JIRA issue
|
2013-05-01 15:00:49 -04:00
|
|
|
covering the work you want to do, create one. Assuming you will be working from the master branch and working
|
2015-06-26 17:38:35 -04:00
|
|
|
on the JIRA HHH-123 : `git checkout -b HHH-123 master`
|
2012-11-14 14:40:13 -05:00
|
|
|
|
|
|
|
|
|
|
|
## Code
|
2016-06-08 03:59:08 -04:00
|
|
|
|
2012-12-31 09:00:51 -05:00
|
|
|
Do yo thing!
|
2012-11-14 14:40:13 -05:00
|
|
|
|
|
|
|
## Commit
|
|
|
|
|
|
|
|
* Make commits of logical units.
|
2015-06-26 17:38:35 -04:00
|
|
|
* Be sure to use the JIRA issue key in the commit message. This is how JIRA will pick
|
|
|
|
up the related commits and display them on the JIRA issue.
|
2012-11-14 14:40:13 -05:00
|
|
|
* Make sure you have added the necessary tests for your changes.
|
|
|
|
* Run _all_ the tests to assure nothing else was accidentally broken.
|
2013-05-22 13:41:37 -04:00
|
|
|
* Make sure your source does not violate the checkstyles.
|
2012-11-14 14:40:13 -05:00
|
|
|
|
2015-06-26 17:38:35 -04:00
|
|
|
_Prior to committing, if you want to pull in the latest upstream changes (highly
|
2012-11-14 14:40:13 -05:00
|
|
|
appreciated btw), please use rebasing rather than merging. Merging creates
|
|
|
|
"merge commits" that really muck up the project timeline._
|
|
|
|
|
|
|
|
## Submit
|
2016-06-08 03:59:08 -04:00
|
|
|
|
2013-05-01 15:00:49 -04:00
|
|
|
* If you have not already, sign the [Contributor License Agreement](https://cla.jboss.org).
|
|
|
|
* Push your changes to the topic branch in your fork of the repository.
|
2016-11-14 14:30:47 -05:00
|
|
|
* Initiate a [pull request](http://help.github.com/articles/creating-a-pull-request)
|
2015-06-26 17:38:35 -04:00
|
|
|
* Update the JIRA issue, adding a comment including a link to the created pull request
|