CONTRIBUTING.md 6.08 KB
Newer Older
John McLear's avatar
John McLear committed
1
# Contributor Guidelines
John McLear's avatar
John McLear committed
2
(Please talk to people on the mailing list before you change this page, see our section on [how to get in touch](https://github.com/ether/etherpad-lite#get-in-touch))
3

Kay Strobach's avatar
Kay Strobach committed
4 5 6 7 8
## How to write a bug report

* Please be polite, we all are humans and problems can occur.
* Please add as much information as possible, for example
  * client os(s) and version(s)
9
    * browser(s) and version(s), is the problem reproducible on different clients
Kay Strobach's avatar
Kay Strobach committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
    * special environments like firewalls or antivirus
  * host os and version
    * npm and nodejs version
    * Logfiles if available
  * steps to reproduce
  * what you expected to happen
  * what actually happened
* Please format logfiles and code examples with markdown see github Markdown help below the issue textarea for more information.

If you send logfiles, please set the loglevel switch DEBUG in your settings.json file:

```
/* The log level we are using, can be: DEBUG, INFO, WARN, ERROR */
  "loglevel": "DEBUG",
```

The logfile location is defined in startup script or the log is directly shown in the commandline after you have started etherpad.


John McLear's avatar
John McLear committed
29
## Important note for pull requests
Kyle Kelley's avatar
Kyle Kelley committed
30
**Pull requests should be issued against the develop branch**.  We never pull directly into master.
John McLear's avatar
John McLear committed
31

32 33
**Our goal is to iterate in small steps. Release often, release early. Evolution instead of a revolution**

34
## General goals of Etherpad
Marcel Klehr's avatar
Marcel Klehr committed
35 36 37
To make sure everybody is going in the same direction:
* easy to install for admins and easy to use for people
* easy to integrate into other apps, but also usable as standalone
John McLear's avatar
John McLear committed
38
* lightweight and scalable
accolade's avatar
accolade committed
39 40
* extensible, as much functionality should be extendable with plugins so changes don't have to be done in core.
Also, keep it maintainable. We don't wanna end up as the monster Etherpad was!
Marcel Klehr's avatar
Marcel Klehr committed
41 42 43 44 45 46 47 48 49

## How to work with git?
* Don't work in your master branch.
* Make a new branch for every feature you're working on. (This ensures that you can work you can do lots of small, independent pull requests instead of one big one with complete different features)
* Don't use the online edit function of github (this only creates ugly and not working commits!)
* Try to make clean commits that are easy readable (including descriptive commit messages!)
* Test before you push. Sounds easy, it isn't!
* Don't check in stuff that gets generated during build or runtime
* Make small pull requests that are easy to review but make sure they do add value by themselves / individually
50

Marcel Klehr's avatar
Marcel Klehr committed
51
## Coding style
52
* Do write comments. (You don't have to comment every line, but if you come up with something that's a bit complex/weird, just leave a comment. Bear in mind that you will probably leave the project at some point and that other people will read your code. Undocumented huge amounts of code are worthless!)
53 54
* Never ever use tabs
* Indentation: JS/CSS: 2 spaces; HTML: 4 spaces
Marcel Klehr's avatar
Marcel Klehr committed
55 56 57 58
* Don't overengineer. Don't try to solve any possible problem in one step, but try to solve problems as easy as possible and improve the solution over time!
* Do generalize sooner or later! (if an old solution, quickly hacked together, poses more problems than it solves today, refactor it!)
* Keep it compatible. Do not introduce changes to the public API, db schema or configurations too lightly. Don't make incompatible changes without good reasons!
* If you do make changes, document them! (see below)
John McLear's avatar
John McLear committed
59
* Use protocol independent urls "//"
60

Marcel Klehr's avatar
Marcel Klehr committed
61
## Branching model / git workflow
62 63
see git flow http://nvie.com/posts/a-successful-git-branching-model/

Marcel Klehr's avatar
Marcel Klehr committed
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
### `master` branch
* the stable
* This is the branch everyone should use for production stuff

### `develop`branch
* everything that is READY to go into master at some point in time
* This stuff is tested and ready to go out

### release branches
* stuff that should go into master very soon
* only bugfixes go into these (see http://nvie.com/posts/a-successful-git-branching-model/ for why)
* we should not be blocking new features to develop, just because we feel that we should be releasing it to master soon. This is the situation that release branches solve/handle.

### hotfix branches
* fixes for bugs in master

### feature branches (in your own repos)
* these are the branches where you develop your features in
82
* If it's ready to go out, it will be merged into develop
83 84 85 86 87 88 89 90

Over the time we pull features from feature branches into the develop branch. Every month we pull from develop into master. Bugs in master get fixed in hotfix branches. These branches will get merged into master AND develop. There should never be commits in master that aren't in develop

## Documentation
The docs are in the `doc/` folder in the git repository, so people can easily find the suitable docs for the current git revision.

Documentation should be kept up-to-date. This means, whenever you add a new API method, add a new hook or change the database model, pack the relevant changes to the docs in the same pull request.

accolade's avatar
accolade committed
91
You can build the docs e.g. produce html, using `make docs`. At some point in the future we will provide an online documentation. The current documentation in the github wiki should always reflect the state of `master` (!), since there are no docs in master, yet.
Eric Schrijver's avatar
Eric Schrijver committed
92 93

## Testing
94
Front-end tests are found in the `tests/frontend/` folder in the repository. Run them by pointing your browser to `<yourdomainhere>/tests/frontend`.
John McLear's avatar
John McLear committed
95 96 97 98 99 100 101 102 103 104 105 106 107 108

## Things you can help with
Etherpad is much more than software.  So if you aren't a developer then worry not, there is still a LOT you can do!  A big part of what we do is community engagement.  You can help in the following ways
 * Triage bugs (applying labels) and confirming their existance
 * Testing fixes (simply applying them and seeing if it fixes your issue or not) - Some git experience required
 * Notifying large site admins of new releases
 * Writing Changelogs for releases
 * Creating Windows packages
 * Creating releases
 * Bumping dependencies periodically and checking they don't break anything
 * Write proposals for grants
 * Co-Author and Publish CVEs
 * Work with SFC to maintain legal side of project
 * Maintain TODO page - https://github.com/ether/etherpad-lite/wiki/TODO#IMPORTANT_TODOS
John McLear's avatar
John McLear committed
109 110
 * Replying to messages on IRC / The Mailing list / Emails