HHH-14400 improve CONTRIBUTING.md

This commit is contained in:
Nathan Xu 2021-01-12 22:22:43 -05:00 committed by Christian Beikov
parent 633d0f08d6
commit 949ba3b083
1 changed files with 22 additions and 24 deletions

View File

@ -21,19 +21,18 @@ While we try to keep requirements for contributing to a minimum, there are a few
we ask that you mind. we ask that you mind.
For code contributions, these guidelines include: For code contributions, these guidelines include:
* respect the project code style - find templates for [Eclipse](https://community.jboss.org/docs/DOC-16649) * respect the project code style - find templates for [IntelliJ IDEA](https://community.jboss.org/docs/DOC-15468) or [Eclipse](https://community.jboss.org/docs/DOC-16649)
and [IntelliJ IDEA](https://community.jboss.org/docs/DOC-15468)
* have a corresponding JIRA issue and the key for this JIRA issue should be used in the commit message * have a corresponding JIRA issue and the key for this JIRA issue should be used in the commit message
* have a set of appropriate tests. For bug reports, the tests reproduce the initial reported bug * have a set of appropriate tests. For bug reports, the tests reproduce the initial reported bug
and illustrates that the solution actually fixes the bug. For features/enhancements, the and illustrates that the solution actually fixes the bug. For features/enhancements, the
tests illustrate the feature working as intended. In both cases the tests are incorporated into tests illustrate the feature working as intended. In both cases the tests are incorporated into
the project to protect against regressions. the project to protect against regressions
* if applicable, documentation is updated to reflect the introduced changes * if applicable, documentation is updated to reflect the introduced changes
* the code compiles and the tests pass (`./gradlew clean build`) * the code compiles and the tests pass (`./gradlew clean build`)
For documentation contributions, mainly just respect the project code style, especially in regards For documentation contributions, mainly just respect the project code style, especially in regards
to use of tabs - as mentioned above, code style templates are available for both Eclipse and IntelliJ to use of tabs - as mentioned above, code style templates are available for both IntelliJ IDEA and Eclipse
IDEA IDEs. Ideally these contributions would also have a corresponding JIRA issue, although this IDEs. Ideally these contributions would also have a corresponding JIRA issue, although this
is less necessary for documentation contributions. is less necessary for documentation contributions.
@ -42,12 +41,12 @@ is less necessary for documentation contributions.
If you are just getting started with Git, GitHub and/or contributing to Hibernate via If you are just getting started with Git, GitHub and/or contributing to Hibernate via
GitHub there are a few pre-requisite steps to follow: GitHub there are a few pre-requisite steps to follow:
* Make sure you have a [Hibernate JIRA account](https://hibernate.atlassian.net) * make sure you have a [Hibernate JIRA account](https://hibernate.atlassian.net)
* Make sure you have a [GitHub account](https://github.com/signup/free) * make sure you have a [GitHub account](https://github.com/signup/free)
* [Fork](https://help.github.com/articles/fork-a-repo) the Hibernate repository. As discussed in * [fork](https://help.github.com/articles/fork-a-repo) the Hibernate repository. As discussed in
the linked page, this also includes: the linked page, this also includes:
* [Set](https://help.github.com/articles/set-up-git) up your local git install * [set up your local git install](https://help.github.com/articles/set-up-git)
* Clone your fork * clone your fork
* See the wiki pages for setting up your IDE, whether you use * See the wiki pages for setting up your IDE, whether you use
[IntelliJ IDEA](https://community.jboss.org/wiki/ContributingToHibernateUsingIntelliJ) [IntelliJ IDEA](https://community.jboss.org/wiki/ContributingToHibernateUsingIntelliJ)
or [Eclipse](https://community.jboss.org/wiki/ContributingToHibernateUsingEclipse)<sup>(1)</sup>. or [Eclipse](https://community.jboss.org/wiki/ContributingToHibernateUsingEclipse)<sup>(1)</sup>.
@ -59,7 +58,7 @@ Create a [topic branch](http://git-scm.com/book/en/Git-Branching-Branching-Workf
on which you will work. The convention is to incorporate the JIRA issue key in the name of this branch, on which you will work. The convention is to incorporate the JIRA issue key in the name of this branch,
although this is more of a mnemonic strategy than a hard-and-fast rule - but doing so helps: although this is more of a mnemonic strategy than a hard-and-fast rule - but doing so helps:
* remember what each branch is for * remember what each branch is for
* isolate the work from other contributions you may be working on. * isolate the work from other contributions you may be working on
_If there is not already a JIRA issue covering the work you want to do, create one._ _If there is not already a JIRA issue covering the work you want to do, create one._
@ -69,17 +68,17 @@ on the JIRA HHH-123 : `git checkout -b HHH-123 master`
## Code ## Code
Do yo thing! Do your thing!
## Commit ## Commit
* Make commits of logical units. * make commits of logical units
* Be sure to use the JIRA issue key in the commit message. This is how JIRA will pick * 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. up the related commits and display them on the JIRA issue
* Make sure you have added the necessary tests for your changes. * make sure you have added the necessary tests for your changes
* Run _all_ the tests to assure nothing else was accidentally broken. * run _all_ the tests to assure nothing else was accidentally broken
* Make sure your source does not violate the checkstyles. * make sure your source does not violate the _checkstyles_
_Prior to committing, if you want to pull in the latest upstream changes (highly _Prior to committing, if you want to pull in the latest upstream changes (highly
appreciated btw), please use rebasing rather than merging. Merging creates appreciated btw), please use rebasing rather than merging. Merging creates
@ -87,10 +86,9 @@ appreciated btw), please use rebasing rather than merging. Merging creates
## Submit ## Submit
* Push your changes to the topic branch in your fork of the repository. * push your changes to the topic branch in your fork of the repository
* Initiate a [pull request](http://help.github.com/articles/creating-a-pull-request) * initiate a [pull request](http://help.github.com/articles/creating-a-pull-request)
* Update the JIRA issue, adding a comment including a link to the created pull request * update the JIRA issue by providing the PR link in the **Pull Request** column on the right
_if the JIRA key was not used in the commit message_.
It is important that this topic branch on your fork: It is important that this topic branch on your fork:
@ -98,9 +96,9 @@ It is important that this topic branch on your fork:
* be isolated to just the work on this one JIRA issue, or multiple issues if they are * be isolated to just the work on this one JIRA issue, or multiple issues if they are
related and also fixed/implemented by this work. The main point is to not push related and also fixed/implemented by this work. The main point is to not push
commits for more than one PR to a single branch - GitHub PRs are linked to commits for more than one PR to a single branch - GitHub PRs are linked to
a branch rather than specific commits. a branch rather than specific commits
* remain until the PR is closed. Once the underlying branch is deleted the corresponding * remain until the PR is closed. Once the underlying branch is deleted the corresponding
PR will be closed, if not already, and the changes will be lost. PR will be closed, if not already, and the changes will be lost
# Notes # Notes
<sup>(1)</sup> Gradle `eclipse` plugin is no longer supported, so the recommended way to import the project in your IDE is with the proper IDE tools/plugins. Don't try to run `./gradlew clean eclipse --refresh-dependencies` from the command line as you'll get an error because `eclipse` no longer exists <sup>(1)</sup> Gradle `eclipse` plugin is no longer supported, so the recommended way to import the project in your IDE is with the proper IDE tools/plugins. Don't try to run `./gradlew clean eclipse --refresh-dependencies` from the command line as you'll get an error because `eclipse` no longer exists