|
| 1 | +# How to contribute |
| 2 | + |
| 3 | +Upload loves to welcome your contributions. There are several ways to help out: |
| 4 | +* Create a ticket in GitHub, if you have found a bug |
| 5 | +* Write testcases for open bug tickets |
| 6 | +* Write patches for open bug/feature tickets, preferably with testcases included |
| 7 | +* Contribute to the [documentation](https://github.com/josegonzalez/upload/tree/gh-pages) |
| 8 | + |
| 9 | +There are a few guidelines that we need contributors to follow so that we have a |
| 10 | +chance of keeping on top of things. |
| 11 | + |
| 12 | +## Getting Started |
| 13 | + |
| 14 | +* Make sure you have a [GitHub account](https://github.com/signup/free) |
| 15 | +* Submit a ticket for your issue, assuming one does not already exist. |
| 16 | + * Clearly describe the issue including steps to reproduce when it is a bug. |
| 17 | + * Make sure you fill in the earliest version that you know has the issue. |
| 18 | +* Fork the repository on GitHub. |
| 19 | + |
| 20 | +## Making Changes |
| 21 | + |
| 22 | +* Create a topic branch from where you want to base your work. |
| 23 | + * This is usually the develop branch |
| 24 | + * To quickly create a topic branch based on master; `git branch |
| 25 | + master/my_contribution master` then checkout the new branch with `git |
| 26 | + checkout master/my_contribution`. Better avoid working directly on the |
| 27 | + `master` branch, to avoid conflicts if you pull in updates from origin. |
| 28 | +* Make commits of logical units. |
| 29 | +* Check for unnecessary whitespace with `git diff --check` before committing. |
| 30 | +* Use descriptive commit messages and reference the #ticket number |
| 31 | +* Core testcases should continue to pass. You can run tests locally or enable |
| 32 | + [travis-ci](https://travis-ci.org/) for your fork, so all tests and codesniffs |
| 33 | + will be executed. |
| 34 | +* Your work should apply the CakePHP coding standards. |
| 35 | + |
| 36 | +## Which branch to base the work |
| 37 | + |
| 38 | +* Bugfix branches will be based on develop branch. |
| 39 | +* New features that are backwards compatible will be based on develop branch |
| 40 | +* New features or other non-BC changes will go in the next major release branch. |
| 41 | + |
| 42 | +## Submitting Changes |
| 43 | + |
| 44 | +* Push your changes to a topic branch in your fork of the repository. |
| 45 | +* Submit a pull request to the repository with the correct target branch. |
| 46 | + |
| 47 | +## Testcases and codesniffer |
| 48 | + |
| 49 | +Upload tests requires [PHPUnit](http://www.phpunit.de/manual/current/en/installation.html) |
| 50 | +3.5 or higher. To run the testcases locally use the following command: |
| 51 | + |
| 52 | + ./lib/Cake/Console/cake test Upload AllUpload |
| 53 | + |
| 54 | +To run the sniffs for CakePHP coding standards |
| 55 | + |
| 56 | + phpcs -p --extensions=php --standard=CakePHP ./app/Plugin/Upload |
| 57 | + |
| 58 | +Check the [cakephp-codesniffer](https://github.com/cakephp/cakephp-codesniffer) |
| 59 | +repository to setup the CakePHP standard. The README contains installation info |
| 60 | +for the sniff and phpcs. |
| 61 | + |
| 62 | + |
| 63 | +# Additional Resources |
| 64 | + |
| 65 | +* [CakePHP coding standards](http://book.cakephp.org/2.0/en/contributing/cakephp-coding-conventions.html) |
| 66 | +* [Bug tracker](https://github.com/josegonzalez/upload/issues) |
| 67 | +* [General GitHub documentation](https://help.github.com/) |
| 68 | +* [GitHub pull request documentation](https://help.github.com/send-pull-requests/) |
| 69 | +* #cakephp IRC channel on freenode.org |
0 commit comments