You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

CONTRIBUTING.md 9.9 kB

2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. # Contributing to Cucumber
  2. Thank you for considering contributing to Cucumber!
  3. This document will first introduce different ways to get involved before
  4. focusing on how to contribute to the code.
  5. ## Code of Conduct
  6. Everyone interacting in this codebase and issue tracker is expected to follow
  7. the Cucumber [code of conduct](https://cucumber.io/conduct).
  8. ## How can I contribute?
  9. If you're reading this, you are certainly looking to contribute to the code. Cucumber
  10. is not this single repository. It is made up of several packages around several
  11. repositories. So before going further with the code, you may consider the
  12. following first, in order to get your bearings.
  13. If you just want to know how to contribute to the code, go to
  14. [Contribute to the code](#contribute-to-the-code).
  15. If you want to report an issue, or suggest an enhancement, go to
  16. [Report bugs and submit feature requests](#report-bugs-and-submit-feature-requests).
  17. ### Meet the community, the maintainers, and other Cucumber developers
  18. Smartbear hosts a [community message board].
  19. This is a good place to meet users, the community, and to ask questions.
  20. You can also join the Cucumber Community Slack:
  21. [register for an account][register-slack] then head over to [#intro][slack-intro].
  22. This is the place to be to meet other contributors and find a mentor to help you
  23. get started.
  24. ### Test Cucumber
  25. Testing Cucumber, especially new features, is a great way to contribute. We
  26. cannot put a price on (early) feedback.
  27. Keep an eye on our CHANGELOGS to discover new features. Test and experiment, and
  28. submit your feedback through [issues](#report-bugs-and-submit-feature-requests),
  29. the [community message board], or [Slack][community-slack].
  30. ### Contribute to the documentation
  31. [The documentation][cucumber-docs] is an important part of Cucumber. It is
  32. essential that it remains simple and accurate. You can contribute to it via
  33. [github.com/cucumber/docs](https://github.com/cucumber/docs).
  34. ### Promote Cucumber
  35. You don't know how to contribute but would like to help? Telling other people
  36. about Cucumber on the Internet - social media, reviews, blogs - but also in real
  37. life is already a big help! Join us on [Slack][community-slack] to share your
  38. publication and to discover new ones.
  39. ## Report bugs and submit feature requests
  40. The short version is:
  41. - Find the appropriate repository
  42. - Try to check there is not already an issue or pull request that deals with
  43. your bug or request
  44. - Explain your issue and include as much details as possible to help other
  45. people reproduce your problem or understand your request
  46. - Consider submitting a pull request if you feel confident enough
  47. You can find more details for each of these steps in the following sections.
  48. ### Find the appropriate repository
  49. The current repository, `cucumber-ruby`, is actually the tip of the iceberg. It
  50. provides a user interface through a CLI, some built-in formatters, and the
  51. execution environment you may know as the `World` object.
  52. An important repository is [cucumber/common]. It is a mono-repo
  53. with a lot of libraries. You will find there what is related to:
  54. - parsing Gherkin documents - aka `.feature` files
  55. - parsing tag expressions - the options you use to filter an execution with tags
  56. - parsing Cucumber expressions - the expressions that link a Gherkin step to a
  57. step definition
  58. - everyting related to the HTML formatter
  59. `cucumber-ruby` is also composed of [cucumber-ruby-core]: this is the engine that
  60. will execute the test cases computed from a parsed Gherkin document
  61. Last but not least, there is also a repository for [cucumber-rails], the gem
  62. that brings Cucumber to Rails 5.x and 6.x.
  63. In any case, if your are not sure, best places to open an issue are the current
  64. repository - `cucumber-ruby` - and the mono-repo at [cucumber/common].
  65. ### Look for existing issues and pull requests
  66. Search in [the current repository][cucumber-ruby-issues], in the
  67. [mono-repo][cucumber/common-issues], but also in the
  68. [whole cucumber organization][cucumber-issues] if the problem or feature has already
  69. been reported. If you find an issue or pull request which is still open, add
  70. comments to it instead of opening a new one.
  71. If you're not sure, don't hesitate to just open a new issue. We can always merge
  72. and de-duplicate later.
  73. ### Submitting a pull request
  74. When submitting a pull request:
  75. - create a [draft pull request][how-to-create-a-draft-pr]
  76. - try to follow the instructions in the [template](.github/PULL_REQUEST_TEMPLATE.md)
  77. - if possible, [sign your commits]
  78. - update CHANGELOG.md with your changes
  79. - once the PR is ready, request for reviews
  80. More info on [how to contribute to the code](#contribute-to-the-code) can be
  81. found below.
  82. ### Opening a new issue
  83. To open a good issue, be clear and precise.
  84. If you report a problem, the reader must be able to reproduce it easily.
  85. Please do your best to create a [minimal, reproducible example][minimal-reproducible-example].
  86. Consider submitting a pull request. Even if you think you cannot fix it by
  87. yourself, a pull request with a failing test is always welcome.
  88. If you request is for an enhancement - a new feature - try to be specific and
  89. support your request with referenced facts and include examples to illustrate
  90. your proposal.
  91. ## Contribute to the code
  92. ### Development environment
  93. Development environment for `cucumber-ruby` is a simple Ruby environment with
  94. Bundler. Use a [supported Ruby version](./README.md#supported-platforms), make
  95. sure [Bundler] is set-up, and voilà!
  96. You can then [fork][how-to-fork] and clone the repository. If your environment
  97. is set-up properly, the following commands should install the dependencies and
  98. execute all the tests successfully.
  99. ```shell
  100. bundle install
  101. bundle exec rake
  102. ```
  103. You can now create a branch for your changes and [submit a pull request](#submitting-a-pull-request)!
  104. If you want to check the code coverage during your development, execute
  105. `bundle exec rake cov`.
  106. ### Cucumber-ruby-core
  107. As seen here: [Find the appropriate repository](#find-the-appropriate-repository),
  108. you may need to work with other repositories in order to accomplish your
  109. development. Beside the mono-repo in [cucumber/common], [cucumber-ruby-core] is
  110. also a big piece of `cucumber-ruby`.
  111. ### Using a local Gemfile
  112. A local Gemfile allows you to use your prefer set of gems for your own
  113. development workflow, like gems dedicated to debugging. Such gems are not part
  114. of `cucumber-ruby` standard `Gemfile`.
  115. `Gemfile.local`, `Gemfile.local.lock` and `.bundle` have been added to
  116. `.gitignore` so local changes cannot be accidentaly commited and pushed to the
  117. repository.
  118. A `Gemfile.local` may look like this:
  119. ```ruby
  120. # Gemfile.local
  121. # Include the regular Gemfile
  122. eval File.read('Gemfile')
  123. # Include your favorites development gems
  124. group :development do
  125. gem 'byebug'
  126. gem 'pry'
  127. gem 'pry-byebug'
  128. gem 'debase', require: false
  129. gem 'ruby-debug-ide', require: false
  130. end
  131. ```
  132. Then you can execute bundler with the `--gemfile` flag:
  133. `bundle install --gemfile Gemfile.local`, or with an environment variable:
  134. `BUNDLE_GEMFILE=Gemfile.local bundle [COMMAND]`.
  135. To use your local Gemfile per default, you can also execute
  136. `bundle config set --local gemfile Gemfile.local`.
  137. ### First timer? Welcome!
  138. Looking for something simple to begin with? Look at issues with the label
  139. '[good first issue](https://github.com/cucumber/cucumber-ruby/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)'.
  140. Remember: Cucumber is more than `cucumber-ruby`. You can look for good first
  141. issues in [other cucumber reporistories](#find-the-appropriate-repository).
  142. ### Having trouble getting started with the code? We're here to help!
  143. If you have trouble setting-up your development environment, or getting started
  144. with the code, you can join us on [Slack][community-slack]. You will find there
  145. a lot of contributors.
  146. Full-time maintainers are also available. We would be please to have 1:1 pairing
  147. sessions to help you getting started. Look for
  148. [Matt Wynne](https://cucumberbdd.slack.com/team/U590XDLF3) or
  149. [Aurélien Reeves](https://cucumberbdd.slack.com/team/U011BB95MC7) on
  150. [Slack][community-slack].
  151. ### Additional documentation and notice
  152. You can find additional documentation in the [docs](./docs) directory such as
  153. (non-exhaustive list):
  154. - [How to release cucumber-ruby](./docs/RELEASE_PROCESS.md) (for maintainers)
  155. - [How to set-up a launch.json configuration for Visual Studio Code](./docs/vscode-example-launch-configuration.md)
  156. <!-- Links -->
  157. [community message board]: https://community.smartbear.com/t5/Cucumber-Open/bd-p/CucumberOS
  158. [register-slack]: https://cucumberbdd-slack-invite.herokuapp.com/
  159. [slack-intro]: https://cucumberbdd.slack.com/messages/C5WD8SA21/
  160. [community-slack]: https://cucumberbdd.slack.com/
  161. [cucumber-docs]: https://cucumber.io/docs/cucumber
  162. [cucumber/common]: https://github.com/cucumber/common
  163. [cucumber-ruby-core]: https://github.com/cucumber/cucumber-ruby-core
  164. [cucumber-rails]: https://github.com/cucumber/cucumber-rails
  165. [cucumber-ruby-issues]: https://github.com/cucumber/cucumber-ruby/search?q=is%3Aissue
  166. [cucumber/common-issues]: https://github.com/cucumber/common/search?q=is%3Aissue
  167. [cucumber-issues]: https://github.com/search?q=is%3Aissue+user%3Acucumber
  168. [how-to-create-a-draft-pr]: https://docs.github.com/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests
  169. [how-to-fork]: https://docs.github.com/github/collaborating-with-pull-requests/working-with-forks/about-forks
  170. [sign your commits]: https://docs.github.com/en/github/authenticating-to-github/managing-commit-signature-verification/signing-commits
  171. [minimal-reproducible-example]: https://stackoverflow.com/help/minimal-reproducible-example
  172. [RVM]: https://rvm.io/
  173. [rbenv]: https://github.com/rbenv/rbenv
  174. [Bundler]: https://bundler.io/

No Description

Contributors (1)