1
- # Guidelines for Contributing
1
+ # Contributing
2
2
3
3
Contributions from the community are essential in keeping Hibernate (any Open Source
4
- project really) strong and successful. While we try to keep requirements for
5
- contributing to a minimum, there are a few guidelines we ask that you mind.
4
+ project really) strong and successful.
5
+
6
+ # Legal
7
+
8
+ All original contributions to Hibernate are licensed under the
9
+ [ GNU Lesser General Public License (LGPL)] ( https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt ) ,
10
+ version 2.1 or later, or, if another license is specified as governing the file or directory being
11
+ modified, such other license. The LGPL text is included verbatim in the link: lgpl .txt[ lgpl.txt] file
12
+ in the root directory of the ORM repository.
13
+
14
+ All contributions are subject to the [ Developer Certificate of Origin (DCO)] ( https://developercertificate.org/ ) .
15
+ The DCO text is also included verbatim in the link: dco .txt[ dco.txt] file in the root directory of the ORM repository.
16
+
17
+
18
+ ## Guidelines
19
+
20
+ While we try to keep requirements for contributing to a minimum, there are a few guidelines
21
+ we ask that you mind.
22
+
23
+ For code contributions, these guidelines include:
24
+ * respect the project code style - find templates for [ Eclipse] ( https://community.jboss.org/docs/DOC-16649 )
25
+ and [ IntelliJ IDEA] ( https://community.jboss.org/docs/DOC-15468 )
26
+ * have a corresponding JIRA issue and the key for this JIRA issue should be used in the commit message
27
+ * have a set of appropriate tests. For bug reports, the tests reproduce the initial reported bug
28
+ and illustrates that the solution actually fixes the bug. For features/enhancements, the
29
+ tests illustrate the feature working as intended. In both cases the tests are incorporated into
30
+ the project to protect against regressions.
31
+ * if applicable, documentation is updated to reflect the introduced changes
32
+ * the code compiles and the tests pass (` ./gradlew clean build ` )
33
+
34
+ For documentation contributions, mainly just respect the project code style, especially in regards
35
+ to use of tabs - as mentioned above, code style templates are available for both Eclipse and IntelliJ
36
+ IDEA IDEs. Ideally these contributions would also have a corresponding JIRA issue, although this
37
+ is less necessary for documentation contributions.
38
+
6
39
7
40
## Getting Started
8
41
9
42
If you are just getting started with Git, GitHub and/or contributing to Hibernate via
10
- GitHub there are a few pre-requisite steps.
43
+ GitHub there are a few pre-requisite steps to follow:
11
44
12
- * Make sure you have signed a [ Contributor License Agreement] ( https://cla.jboss.org ) (CLA) for the Hibernate project
13
45
* Make sure you have a [ Hibernate JIRA account] ( https://hibernate.atlassian.net )
14
46
* Make sure you have a [ GitHub account] ( https://github.com/signup/free )
15
47
* [ Fork] ( https://help.github.com/articles/fork-a-repo ) the Hibernate repository. As discussed in
16
48
the linked page, this also includes:
17
49
* [ Set] ( https://help.github.com/articles/set-up-git ) up your local git install
18
50
* Clone your fork
19
- * See the wiki pages for setting up your IDE, whether you use [ IntelliJ IDEA] ( https://community.jboss.org/wiki/ContributingToHibernateUsingIntelliJ )
51
+ * See the wiki pages for setting up your IDE, whether you use
52
+ [ IntelliJ IDEA] ( https://community.jboss.org/wiki/ContributingToHibernateUsingIntelliJ )
20
53
or [ Eclipse] ( https://community.jboss.org/wiki/ContributingToHibernateUsingEclipse ) .
21
54
55
+
22
56
## Create the working (topic) branch
23
57
24
- Create a [ topic branch] ( http://git-scm.com/book/en/Git-Branching-Branching-Workflows#Topic-Branches ) on which you
25
- will work. The convention is to name the branch using the JIRA issue key. If there is not already a JIRA issue
58
+ Create a [ topic branch] ( http://git-scm.com/book/en/Git-Branching-Branching-Workflows#Topic-Branches )
59
+ on which you will work. The convention is to incorporate the JIRA issue key in the name of this branch,
60
+ although this is more of a mnemonic strategy than a hard=and-fast rule - but doing so helps:
61
+ * remember what each branch is for
62
+ * isolate the work from other contributions you may be working on.
63
+
64
+
65
+ This branch will be the base for
66
+ . If there is not already a JIRA issue
26
67
covering the work you want to do, create one. Assuming you will be working from the master branch and working
27
68
on the JIRA HHH-123 : ` git checkout -b HHH-123 master `
28
69
@@ -46,7 +87,17 @@ appreciated btw), please use rebasing rather than merging. Merging creates
46
87
47
88
## Submit
48
89
49
- * If you have not already, sign the [ Contributor License Agreement] ( https://cla.jboss.org ) .
50
90
* Push your changes to the topic branch in your fork of the repository.
51
91
* Initiate a [ pull request] ( http://help.github.com/articles/creating-a-pull-request )
52
92
* Update the JIRA issue, adding a comment including a link to the created pull request
93
+ _if the JIRA key was not used in the commit message_.
94
+
95
+
96
+ It is important that this topic branch on your fork:
97
+
98
+ * be isolated to just the work on this one JIRA issue, or multiple issues if they are
99
+ related and also fixed/implemented by this work. The main point is to not push
100
+ commits for more than one PR to a single branch - GitHub PRs are linked to
101
+ a branch rather than specific commits.
102
+ * remain until the PR is closed. Once the underlying branch is deleted the corresponding
103
+ PR will be closed, if not already, and the changes will be lost.
0 commit comments