| 1 |
Contribution guide |
| 2 |
================== |
| 3 |
|
| 4 |
This document outlines how to contribute to this project. It details |
| 5 |
instructions on how to submit issues, bug reports and patches. |
| 6 |
|
| 7 |
Before you participate in the community, you should agree to respect |
| 8 |
the `Contributor Covenant code of conduct <https://www.contributor-covenant.org>`_ |
| 9 |
|
| 10 |
.. Those need to change according to your own project. |
| 11 |
.. |
| 12 |
.. make sure you review each line and also fix the link in webirc.html |
| 13 |
.. |
| 14 |
.. |project_name| replace:: rsendmail |
| 15 |
.. _project: https://gitlab.com/anarcat/rsendmail/ |
| 16 |
.. _merge requests: https://gitlab.com/anarcat/rsendmail/merge_requests |
| 17 |
.. _tag: https://gitlab.com/anarcat/rsendmail/tags |
| 18 |
.. _issues: https://gitlab.com/anarcat/rsendmail/issues |
| 19 |
.. _edited online: https://gitlab.com/anarcat/rsendmail/edit/master/README.md |
| 20 |
|
| 21 |
Positive feedback |
| 22 |
----------------- |
| 23 |
|
| 24 |
Even if you have no changes, suggestions, documentation or bug reports |
| 25 |
to submit, even just positive feedback like "it works" goes a long |
| 26 |
way. It shows the project is being used and gives instant |
| 27 |
gratification to contributors. So we welcome emails that tell us of |
| 28 |
your positive experiences with the project or just thank you |
| 29 |
notes. Head out to :ref:`contact` for contact informations or submit |
| 30 |
a closed issue with your story. |
| 31 |
|
| 32 |
You can also send your "thanks" through `saythanks.io |
| 33 |
<https://saythanks.io/to/anarcat>`_. |
| 34 |
|
| 35 |
.. image:: https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg |
| 36 |
:alt: Say thanks to the author |
| 37 |
:target: https://saythanks.io/to/anarcat |
| 38 |
|
| 39 |
Documentation |
| 40 |
------------- |
| 41 |
|
| 42 |
We love documentation! |
| 43 |
|
| 44 |
The documentation resides in various `Sphinx |
| 45 |
<http://www.sphinx-doc.org/>`_ documentations and in the README |
| 46 |
file. Those can can be `edited online`_ once you register and changes |
| 47 |
are welcome through the normal patch and merge request system. |
| 48 |
|
| 49 |
Issues found in the documentation are also welcome, see below to file |
| 50 |
issues in our tracker. |
| 51 |
|
| 52 |
Issues and bug reports |
| 53 |
---------------------- |
| 54 |
|
| 55 |
We want you to report issuess you find in the software. It is a |
| 56 |
recognized and important part of contributing to this project. All |
| 57 |
issues will be read and replied to politely and |
| 58 |
professionnally. Issues and bug reports should be filed on the `issue |
| 59 |
tracker <issues_>`_. |
| 60 |
|
| 61 |
Issue triage |
| 62 |
~~~~~~~~~~~~ |
| 63 |
|
| 64 |
Issue triage is a useful contribution as well. You can review the |
| 65 |
`issues`_ in the `project page <project_>`_ and, for each issue: |
| 66 |
|
| 67 |
- try to reproduce the issue, if it is not reproducible, label it with |
| 68 |
``more-info`` and explain the steps taken to reproduce |
| 69 |
- if information is missing, label it with ``more-info`` and request |
| 70 |
specific information |
| 71 |
- if the feature request is not within the scope of the project or |
| 72 |
should be refused for other reasons, use the ``wontfix`` label and |
| 73 |
close the issue |
| 74 |
- mark feature requests with the ``enhancement`` label, bugs with |
| 75 |
``bug``, duplicates with ``duplicate`` and so on... |
| 76 |
|
| 77 |
Note that some of those operations are available only to project |
| 78 |
maintainers, see below for the different statuses. |
| 79 |
|
| 80 |
Security issues |
| 81 |
~~~~~~~~~~~~~~~ |
| 82 |
|
| 83 |
Security issues should first be disclosed privately to the project |
| 84 |
maintainers (see :doc:`contact`), which support receiving encrypted |
| 85 |
emails through the usual OpenPGP key discovery mechanisms. |
| 86 |
|
| 87 |
This project cannot currently afford bounties for security issues. We |
| 88 |
would still ask that you coordinate disclosure, giving the project a |
| 89 |
reasonable delay to produce a fix and prepare a release before public |
| 90 |
disclosure. |
| 91 |
|
| 92 |
Public recognition will be given to reporters security issues if |
| 93 |
desired. We otherwise agree with the `Disclosure Guidelines`_ of the |
| 94 |
`HackerOne project`_, at the time of writing. |
| 95 |
|
| 96 |
.. _Disclosure Guidelines: https://www.hackerone.com/disclosure-guidelines |
| 97 |
.. _HackerOne project: https://www.hackerone.com/ |
| 98 |
|
| 99 |
Patches |
| 100 |
------- |
| 101 |
|
| 102 |
Patches can be submitted through `merge requests`_ on the `project |
| 103 |
page <project_>`_. |
| 104 |
|
| 105 |
Some guidelines for patches: |
| 106 |
|
| 107 |
- A patch should be a minimal and accurate answer to exactly one |
| 108 |
identified and agreed problem. |
| 109 |
- A patch must compile cleanly and pass project self-tests on all |
| 110 |
target platforms. |
| 111 |
- A patch commit message must consist of a single short (less than 50 |
| 112 |
characters) line stating a summary of the change, followed by a blank |
| 113 |
line and then a description of the problem being solved and its |
| 114 |
solution, or a reason for the change. Write more information, not |
| 115 |
less, in the commit log. |
| 116 |
- Patches should be reviewed by at least one maintainer before being |
| 117 |
merged. |
| 118 |
|
| 119 |
Project maintainers should merge their own patches only when they have |
| 120 |
been approved by other maintainers, unless there is no response within a |
| 121 |
reasonable timeframe (roughly one week) or there is an urgent change to |
| 122 |
be done (e.g. security or data loss issue). |
| 123 |
|
| 124 |
As an exception to this rule, this specific document cannot be changed |
| 125 |
without the consensus of all administrators of the project. |
| 126 |
|
| 127 |
Note: Those guidelines were inspired by the `Collective Code |
| 128 |
Construct Contract`_. The document was found to be a little too |
| 129 |
complex and hard to read and wasn't adopted in its entirety. See |
| 130 |
this `discussion`_ for more information. |
| 131 |
|
| 132 |
.. _Collective Code Construct Contract: https://rfc.zeromq.org/spec:42/C4/ |
| 133 |
.. _discussion: https://github.com/zeromq/rfc/issues?utf8=%E2%9C%93&q=author%3Aanarcat%20 |
| 134 |
|
| 135 |
Patch triage |
| 136 |
~~~~~~~~~~~~ |
| 137 |
|
| 138 |
You can also review existing pull requests, by cloning the contributor's |
| 139 |
repository and testing it. If the tests do not pass (either locally or |
| 140 |
in the online Continuous Integration (CI) system), if the patch is |
| 141 |
incomplete or otherwise does not respect the above guidelines, submit a |
| 142 |
review with "changes requested" with reasoning. |
| 143 |
|
| 144 |
Testing |
| 145 |
------- |
| 146 |
|
| 147 |
Running tests is strongly recommended before filing issues and |
| 148 |
submitting patches. Patches that break tests will not be accepted. We |
| 149 |
also aim to have complete test coverage, so you may be requested to |
| 150 |
submit a test alongside new features or bugfixes. See the |
| 151 |
:ref:`testsuite` section for more information. |
| 152 |
|
| 153 |
Membership |
| 154 |
---------- |
| 155 |
|
| 156 |
There are three levels of membership in the project, Administrator (also |
| 157 |
known as "Owner" in GitHub or GitLab), Maintainer (also known as |
| 158 |
"Member" on GitHub or "Developer" on GitLab), or regular users (everyone |
| 159 |
with or without an account). Anyone is welcome to contribute to the |
| 160 |
project within the guidelines outlined in this document, regardless of |
| 161 |
their status, and that includes regular users. |
| 162 |
|
| 163 |
Maintainers can: |
| 164 |
|
| 165 |
- do everything regular users can |
| 166 |
- review, push and merge pull requests |
| 167 |
- edit and close issues |
| 168 |
|
| 169 |
Administrators can: |
| 170 |
|
| 171 |
- do everything maintainers can |
| 172 |
- add new maintainers |
| 173 |
- promote maintainers to administrators |
| 174 |
|
| 175 |
Regular users can be promoted to maintainers if they contribute to the |
| 176 |
project, either by participating in issues, documentation or pull |
| 177 |
requests. |
| 178 |
|
| 179 |
Maintainers can be promoted to administrators when they have given |
| 180 |
significant contributions for a sustained timeframe, by consensus of the |
| 181 |
current administrators. This process should be open and decided as any |
| 182 |
other issue. |
| 183 |
|
| 184 |
Release process |
| 185 |
--------------- |
| 186 |
|
| 187 |
.. _Semantic Versioning: http://semver.org/ |
| 188 |
|
| 189 |
To make a release: |
| 190 |
|
| 191 |
1. make sure tests pass:: |
| 192 |
|
| 193 |
tox |
| 194 |
|
| 195 |
2. generate release notes with:: |
| 196 |
|
| 197 |
git changelog |
| 198 |
|
| 199 |
3. tag the release according to `Semantic Versioning`_ rules:: |
| 200 |
|
| 201 |
git tag -s x.y.z |
| 202 |
|
| 203 |
4. build the Python package:: |
| 204 |
|
| 205 |
python3 setup.py bdist_wheel |
| 206 |
|
| 207 |
5. build the Debian package:: |
| 208 |
|
| 209 |
gbp buildpackage |
| 210 |
|
| 211 |
6. push changes:: |
| 212 |
|
| 213 |
git push |
| 214 |
dput ../rsendmail*_source.changes |
| 215 |
twine upload dist/* |