CONTRIBUTING.md 2.05 KB
Newer Older
Romain Bignon's avatar
Romain Bignon committed
1
2
3
4
5
6
How to contribute
=================

Write a patch
-------------

7
Help yourself with the `documentation <http://docs.weboob.org/>`_.
Romain Bignon's avatar
Romain Bignon committed
8

9
10
Find an opened issue on `this website <https://git.weboob.org/weboob/devel/issues>`_, or write your own bugfix or feature.
Then, once it is necessary, commit with::
Romain Bignon's avatar
Romain Bignon committed
11

12
    $ git commit -a
Romain Bignon's avatar
Romain Bignon committed
13
14
15

Do not forget to write a helpful commit message.

16

Romain Bignon's avatar
Romain Bignon committed
17
18
19
Check your patch
----------------

20
You can run these scripts to be sure your patch doesn't break anything::
Romain Bignon's avatar
Romain Bignon committed
21

22
23
24
    $ tools/pyflakes.sh
    $ tools/weboob_lint.sh
    $ tools/run_tests.sh yourmodulename  # or without yourmodulename to test everything
Romain Bignon's avatar
Romain Bignon committed
25

26
27
Perhaps you should also write or fix tests. These tests are automatically run by
`Gitlab CI <https://git.weboob.org/weboob/devel/pipelines>`_ at each commit and merge requests.
Romain Bignon's avatar
Romain Bignon committed
28

29

30
31
Create a merge request or send a patch
--------------------------------------
Romain Bignon's avatar
Romain Bignon committed
32

33
34
35
The easiest way to send your patch is to create a fork on `the Weboob Gitlab <https://git.weboob.org>`_ and create a merge
request from there. This way, the code review process is easier and continuous integration is run automatically (see
previous section).
Romain Bignon's avatar
Romain Bignon committed
36

37
If you prefer good old email patches, just use
Romain Bignon's avatar
Romain Bignon committed
38

39
::
Romain Bignon's avatar
Romain Bignon committed
40

41
    $ git format-patch -n -s origin
Romain Bignon's avatar
Romain Bignon committed
42

43
Then, send them with this command::
Romain Bignon's avatar
Romain Bignon committed
44

45
    $ git send-email --to=weboob@weboob.org *.patch
Romain Bignon's avatar
Romain Bignon committed
46

47
You can also send the files by yourself if you haven't any configured MTA on your system.
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64


Notes on merging a merge request
--------------------------------

Few people (members of the [Weboob group on this
repo](https://git.weboob.org/groups/weboob/group_members)) have the right to
merge a MR.

Anyone is welcome to review and comment pending merge requests. A merge
request should in principle have at least two reviewers before getting merged.

Weboob `devel` repo should keep an history as linear as possible. Then,
merging a merge request should be done locally, with prior rebasing upon the
`master` branch and take care of using the `-ff-only` merge option. Merge
requests should **NOT** be merged through the Gitlab UI, which would result in
an extra "merge" commit.