CONTRIBUTING.md 4.81 KB
Newer Older
Hugo NOUTS's avatar
Hugo NOUTS committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# How to contribute to LyonLivingLabEnergy?

Thank you for your interest in contributing to this Cozy application! There are many ways to contribute, and we appreciate all of them.


## Security Issues

If you discover a security issue, please bring it to our attention right away! Please **DO NOT** file a public issue, instead send your report privately to security AT cozycloud DOT cc.

Security reports are greatly appreciated and we will publicly thank you for it. We currently do not offer a paid security bounty program, but are not ruling it out in the future.


## Bug Reports

While bugs are unfortunate, they're a reality in software. We can't fix what we don't know about, so please report liberally. If you're not sure if something is a bug or not, feel free to file a bug anyway.

Opening an issue is as easy as following [this link][issues] and filling out the fields. Here are some things you can write about your bug:

- A short summary
- What did you try, step by step?
- What did you expect?
- What did happen instead?
- What is the version of the LyonLivingLabEnergy app?


## Pull Requests

Please keep in mind that:

- Pull-Requests point to the `master` branch
- You need to cover your code and feature by tests
- You may add documentation in the `/docs` directory to explain your choices if needed
- We recommend to use [task lists][checkbox] to explain steps / features in your Pull-Request description
- you do _not_ need to build app to submit a PR
- you should update the Transifex source locale file if you modify it for your feature needs (see [Localization section in README][localization])


### Workflow

Pull requests are the primary mechanism we use to change Cozy. GitHub itself has some [great documentation][pr] on using the Pull Request feature. We use the _fork and pull_ model described there.

#### Step 1: Fork

Fork the project on GitHub and [check out your copy locally][forking].

```
Yoan VALLET's avatar
Yoan VALLET committed
47
48
49
$ git clone https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo.git
$ cd ecolyo
$ git remote add fork git://github.com/yourusername/ecolyo.git
Hugo NOUTS's avatar
Hugo NOUTS committed
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
```

#### Step 2: Branch

Create a branch and start hacking:

```
$ git checkout -b my-branch origin/master
```

#### Step 3: Code

Well, we think you know how to do that. Just be sure to follow the coding guidelines from the community ([standard JS][stdjs], comment the code, etc).

#### Step 4: Test

Don't forget to add tests and be sure they are green:

```
Yoan VALLET's avatar
Yoan VALLET committed
69
$ cd ecolyo
Hugo NOUTS's avatar
Hugo NOUTS committed
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
$ npm run test
```

#### Step 5: Commit

Writing [good commit messages][commitmsg] is important. A commit message should describe what changed and why.

Please follow the [Conventional Commits Specification][conventional-commits] to write your commits.

#### Step 6: Rebase

Use `git rebase` (_not_ `git merge`) to sync your work from time to time.

```
$ git fetch origin
$ git rebase origin/master my-branch
```

#### Step 7: Push

```
$ git push -u fork my-branch
```

Yoan VALLET's avatar
Yoan VALLET committed
94
Go to https://github.com/yourusername/ecolyo and select your branch. Click the 'Pull Request' button and fill out the form.
Hugo NOUTS's avatar
Hugo NOUTS committed
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121

Alternatively, you can use [hub] to open the pull request from your terminal:

```
$ git pull-request -b master -m "My PR message" -o
```

Pull requests are usually reviewed within a few days. If there are comments to address, apply your changes in a separate commit and push that to your branch. Post a comment in the pull request afterwards; GitHub doesn't send out notifications when you add commits.


## Writing documentation

Documentation improvements are very welcome. We try to keep a good documentation in the `/docs` folder. But, you know, we are developers, we can forget to document important stuff that look obvious to us. And documentation can always be improved.


## Translations

The LyonLivingLabEnergy is translated on a platform called [Transifex][tx]. [This tutorial][tx-start] can help you to learn how to make your first steps here. If you have any question, don't hesitate to ask us!


## Community

You can help us by making our community even more vibrant. For example, you can write a blog post, take some videos, answer the questions on [the forum][forum], organize new meetups, and speak about what you like in Cozy!



[conventional-commits]: https://conventionalcommits.org
Yoan VALLET's avatar
Yoan VALLET committed
122
[issues]: https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/issues/new
Hugo NOUTS's avatar
Hugo NOUTS committed
123
124
125
126
[pr]: https://help.github.com/categories/collaborating-with-issues-and-pull-requests/
[forking]: http://blog.campoy.cat/2014/03/github-and-go-forking-pull-requests-and.html
[stdjs]: http://standardjs.com/
[commitmsg]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
Yoan VALLET's avatar
Yoan VALLET committed
127
[localization]: https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/blob/master/README.md#localization
Hugo NOUTS's avatar
Hugo NOUTS committed
128
129
130
131
[hub]: https://hub.github.com/
[tx]: https://www.transifex.com/cozy/
[tx-start]: http://docs.transifex.com/getting-started/translators/
[forum]: https://forum.cozy.io/