| 1 | Contributing |
| 2 | ============ |
| 3 | |
| 4 | Overview |
| 5 | -------- |
| 6 | |
| 7 | - Make your changes. |
| 8 | - Update `NEWS.md.in`. |
| 9 | - Update `.mailmap` if necessary. |
| 10 | - Write a test covering your feature or fix. |
| 11 | - Ensure existing and new tests are passing. |
| 12 | - Submit a pull request on GitHub. |
| 13 | |
| 14 | Explanation |
| 15 | ----------- |
| 16 | |
| 17 | Consider updating `NEWS.md.in`. The topmost section is for the upcoming |
| 18 | release. Bugfixes should be marked with `BUGFIX`. Small things (typos, |
| 19 | code style) should be grouped but with multiple authors (`Documentation |
| 20 | updates thanks to Dan Croak and Roberto Pedroso`). |
| 21 | |
| 22 | We use your name and email address as produced by `git-shortlog(1)`. You |
| 23 | can change how this is formatted by modifying `.mailmap`. More details |
| 24 | on that file can be found in the git [Documentation/mailmap.txt][mailmap]. |
| 25 | |
| 26 | It is mandatory to include tests with pull requests. You must ensure that the |
| 27 | existing test suite passes with any changes you make. Also, any attempts to add |
| 28 | or extend tests will increase the chances of your pull request being merged. |
| 29 | |
| 30 | Submit a pull request using GitHub. If there is a relevant bug, mention |
| 31 | it in the commit message (`Fixes #42.`). We love pull requests from everyone. |
| 32 | By participating in this project, you agree to abide by the thoughtbot |
| 33 | [code of conduct]. |
| 34 | |
| 35 | [mailmap]: https://github.com/git/git/blob/master/Documentation/mailmap.txt |
| 36 | [code of conduct]: https://thoughtbot.com/open-source-code-of-conduct |
| 37 | |
| 38 | Setup |
| 39 | ----- |
| 40 | |
| 41 | 1. Fork the repo. |
| 42 | 2. Install dependencies |
| 43 | - Cram is used for tests: `pip install cram` |
| 44 | - We rely on mustache to build the HTML pages; pystache is used : `pip install pystache` |
| 45 | 3. Prepare the build system: `./autogen.sh`. (This depends on GNU |
| 46 | autoconf and GNU automake.) |
| 47 | 4. Configure the package: `./configure`. |
| 48 | 5. Make sure the tests pass: `make check`. |
| 49 | 6. Start hacking |
| 50 | |
| 51 | Testing |
| 52 | ------- |
| 53 | |
| 54 | The test suite uses [cram][]. It is an integration suite, meaning the |
| 55 | programs are exercised from the outside and assertions are made only on |
| 56 | their output or effects. |
| 57 | |
| 58 | The test suite requires Perl with the `Cwd` module. It expects to find Perl as |
| 59 | `perl` in `$PATH`. |
| 60 | |
| 61 | All tests can be run like so: |
| 62 | |
| 63 | make check |
| 64 | |
| 65 | Individual tests can be run like so: |
| 66 | |
| 67 | env TESTS=test/lsrc-dotfiles-dirs.t make -e check |
| 68 | |
| 69 | If you intend to write a new test: |
| 70 | |
| 71 | 1. Add your test at `test/subcommand-something-meaningful.t`. |
| 72 | 2. Add the relative name to the `TESTS` variable in `Makefile.am`. |
| 73 | 3. Source `test/helper.sh` as the first line of your test. |
| 74 | 4. When in doubt, use existing tests as a guide. |
| 75 | |
| 76 | [cram]: https://bitheap.org/cram/ |
| 77 | |
| 78 | Governance |
| 79 | ========== |
| 80 | |
| 81 | Your interaction with this project can be divided into three sections: you as a |
| 82 | contributor, you as a committer, and how to become a committer. |
| 83 | |
| 84 | Commenter and meta-contributor |
| 85 | ------------------------------ |
| 86 | |
| 87 | Those commenting and triaging issues and pull reports are expected to adhere to |
| 88 | our [code of conduct]. |
| 89 | |
| 90 | Contributor |
| 91 | ----------- |
| 92 | |
| 93 | This is a slow-moving project. The maintainers' goal is to provide a yearly |
| 94 | release. |
| 95 | |
| 96 | As a contributor, you can expect a maintainer to add a GitHub label to your |
| 97 | pull request or issue within two weeks. This indicates that a maintainer has |
| 98 | seen your contribution and quickly triaged it. If a maintainer believe that |
| 99 | your feature request will not be merged, they will tell you as much during the |
| 100 | triage step. |
| 101 | |
| 102 | Bug reports, either as issues or as pull requests, get the maintainers' |
| 103 | priority. The maintainers consider documentation bugs to be as important as |
| 104 | code bugs. |
| 105 | |
| 106 | Feature contributions (that is, a pull request that add a new feature) get |
| 107 | lower priority. A maintainer will evaluate the patch carefully for |
| 108 | maintainability and to ensure the test coverage is high. |
| 109 | |
| 110 | Feature requests without a patch will be closed. A maintainer will try to |
| 111 | provide a description of how to write your patch while we close the request, |
| 112 | though they cannot guarantee this. |
| 113 | |
| 114 | Interactions outside of GitHub Issues and Pull Requests are not considered |
| 115 | contributing. For example, tweeting about a bug in rcm is not contributing to |
| 116 | rcm, and therefore we can make no guarantees or promises about such an action. |
| 117 | |
| 118 | You are expected to adhere to our [code of conduct]. |
| 119 | |
| 120 | Committer |
| 121 | --------- |
| 122 | |
| 123 | As a committer, you can merge at any time. The maintainers encourage you to |
| 124 | have the code reviewed by someone beforehand. Those in the thoughtbot team can |
| 125 | ping the `@thoughtbot/shell` group. |
| 126 | |
| 127 | You are expected to adhere to our [code of conduct]. |
| 128 | |
| 129 | Maintainer |
| 130 | ---------- |
| 131 | |
| 132 | A maintainer acts as a project manager and, as such, has final say and |
| 133 | responsibility. |
| 134 | |
| 135 | All maintainers must adhere to our [code of conduct]. |
| 136 | |
| 137 | Promotion |
| 138 | --------- |
| 139 | |
| 140 | All current thoughtbot employees are committers to rcm. |
| 141 | |
| 142 | Contributors with two merged patches are welcome to request committer access by |
| 143 | emailing [email protected]. |
| 144 | |
| 145 | Existing contributors become a maintainer by taking on more work and |
| 146 | responsibility. |