|
| 1 | +# Contributing |
| 2 | + |
| 3 | +These guidelines instruct how to submit issues and contribute code to the JavaFXLibrary. |
| 4 | + |
| 5 | +## Submitting Issues |
| 6 | + |
| 7 | +Bugs and enhancements are tracked in the issue tracker. If you are unsure if something is a bug or is a feature worth implementing, you can first ask on on [Slack](http://robotframework.slack.com) #JavaFXLibrary channel. These and other similar forums, not the issue tracker, are also places where to ask general questions. |
| 8 | + |
| 9 | +Before submitting a new issue, it is always a good idea to check is the same bug or enhancement already reported. If it is, please add your comments to the existing issue instead of creating a new one. |
| 10 | + |
| 11 | +## Code Contributions |
| 12 | + |
| 13 | +On GitHub pull requests are the main mechanism to contribute code. They |
| 14 | +are easy to use both for the contributor and for person accepting |
| 15 | +the contribution, and with more complex contributions it is easy also |
| 16 | +for others to join the discussion. Preconditions for creating a pull |
| 17 | +requests are having a [GitHub account](https://github.com/), |
| 18 | +installing [Git](https://git-scm.com>) and forking the |
| 19 | +_JavaFXLibrary project_. |
| 20 | + |
| 21 | +GitHub has good articles explaining how to |
| 22 | +[set up Git](https://help.github.com/articles/set-up-git/), |
| 23 | +[fork a repository](https://help.github.com/articles/fork-a-repo/) and |
| 24 | +[use pull requests](https://help.github.com/articles/using-pull-requests) |
| 25 | +and we do not go through them in more detail. We do, however, |
| 26 | +recommend to create dedicated branches for pull requests instead of creating |
| 27 | +them based on the master branch. This is especially important if you plan to |
| 28 | +work on multiple pull requests at the same time. |
| 29 | + |
| 30 | +##Tests |
| 31 | + |
| 32 | +When submitting a pull request with a new feature or a fix, you should |
| 33 | +always include tests for your changes. These tests prove that your changes |
| 34 | +work, help prevent bugs in the future, and help document what your changes |
| 35 | +do. Depending an the change, you may need acceptance tests, unit tests |
| 36 | +or both. |
| 37 | + |
| 38 | +Make sure to run all of the tests before submitting a pull request to be sure |
| 39 | +that your changes do not break anything. |
| 40 | + |
| 41 | +## Finalizing Pull Requests |
| 42 | + |
| 43 | +Once you have code, documentation and tests ready, it is time to finalize |
| 44 | +the pull request. |
| 45 | + |
| 46 | +### AUTHORS.txt |
| 47 | + |
| 48 | +If you have done any non-trivial change and would like to be credited, |
| 49 | +add yourself to _AUTHORS.txt_ file. |
| 50 | + |
| 51 | +### Resolving Conflicts |
| 52 | + |
| 53 | +Conflicts can occur if there are new changes to the master that touch the |
| 54 | +same code as your changes. In that case you should [sync your fork](https://help.github.com/articles/syncing-a-fork) and [resolve conflicts](https://help.github.com/articles/resolving-a-merge-conflict-from-the-command-line) |
| 55 | +to allow for an easy merge. |
| 56 | + |
| 57 | +### Squashing Commits |
| 58 | + |
| 59 | +If the pull request contains multiple commits, it is recommended that you |
| 60 | +squash them into a single commit before the pull request is merged. |
| 61 | +See [Squashing Github pull requests into a single commit](http://eli.thegreenplace.net/2014/02/19/squashing-github-pull-requests-into-a-single-commit) |
| 62 | +article for more details about why and how. |
| 63 | + |
| 64 | +Squashing is especially important if the pull request contains lots of |
| 65 | +temporary commits and changes that have been later reverted or redone. |
| 66 | +Squashing is not needed if the commit history is clean and individual |
| 67 | +commits are meaningful alone. |
0 commit comments