From e0b4e6ac784c7ab6ace6ef410c90ec578146718d Mon Sep 17 00:00:00 2001 From: Pierre Vanduynslager Date: Sat, 6 Jan 2018 18:06:44 -0500 Subject: [PATCH] docs: add CONTRIBUTING guidelines --- CONTRIBUTING.md | 238 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 238 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..5610a812d5 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,238 @@ +# Contributing to semantic-release + +✨ Thanks for contributing to **semantic-release**! ✨ + +As a contributor, here are the guidelines we would like you to follow: + +- [Code of conduct](#code-of-conduct) +- [How can I contribute?](#how-can-i-contribute) +- [Using the issue tracker](#using-the-issue-tracker) +- [Submitting a Pull Request](#submitting-a-pull-request) +- [Coding rules](#coding-rules) +- [Working with the code](#working-with-the-code) + +We also recommend to read [How to Contribute to Open Source](https://opensource.guide/how-to-contribute). + +## Code of conduct + +Help us keep **semantic-release** open and inclusive. Please read and follow our [Code of conduct](CODE_OF_CONDUCT.md). + +## How can I contribute? + +### Improve documentation + +As a **semantic-release** user you are the perfect candidate to help us improve our documentation: typo corrections, clarifications, more examples, new [recipes](docs/recipes/README.md) etc. + +Take a look at the [documentation issues that need help](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+user%3Asemantic-release+archived%3Afalse+label%3A%22help+wanted%22+label%3Adocs+). + +Please follow the [Documentation guideline](#documentation). + +### Give feedback on issues + +Some issues are created without information requested in the [Bug report guideline](#bug-report). Help making them easier to resolve by adding any relevant informations. + +The issue [Design issue](https://github.com/issues?q=is%3Aopen+is%3Aissue+user%3Asemantic-release+archived%3Afalse+label%3Adesign) are meant to discuss the implementation of new features. Participating in the discussion is a good opportunity to get involved and influence the future direction of **semantic-release**. + +### Fix bugs and implement features + +Confirmed bug reports and ready to implement features are marked with the [help wanted label](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+user%3Asemantic-release+archived%3Afalse+label%3A%22help+wanted%22). Post a comment on an issue to indicate you would like to work on it and to request help from the [@semantic-release/maintainers](https://github.com/orgs/semantic-release/teams/contributors) and the community. + +## Using the issue tracker + +The issue tracker is the channel for [bug reports](#bug-report), [features requests](#feature-request) and [submitting pull requests](#submitting-a-pull-request) only. Please use the [Support](docs/support/README.md) and [Get help](README.md#get-help) sections for support, troubleshooting and questions. + +Before opening an Issue or a Pull Request, please the use the [GitHub issue search](https://github.com/issues?utf8=%E2%9C%93&q=user%3Asemantic-release) to make the issue or feature request hasn't been already reported or fixed. + +### Bug report + +A good bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report and fill the information request in the Issue Template. + +### Feature request + +Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Please provide as much detail and context as possible. + +## Submitting a Pull Request + +Good pull requests - patches, improvements, new features - are a fantastic help. They should remain focused in scope and avoid containing unrelated commits. + +**Please ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project. + +If you never created a pull request before, welcome 🎉 😄 [Here is a great tutorial](https://opensource.guide/how-to-contribute/#opening-a-pull-request) on how to send one :) + +1. [Set up the workspace](#set-up-the-workspace) +2. If you cloned a while ago, get the latest changes from upstream and update dependencies: +```bash +$ git checkout master +$ git pull upstream master +$ rm -rf node_modules +$ npm install +``` +3. Create a new topic branch (off the main project development branch) to contain your feature, change, or fix: +```bash +$ git checkout -b +``` +4. Make your code changes, following the [Coding rules](#coding-rules) +5. Push your topic branch up to your fork: +```bash +$ git push origin +``` +6. [Open a Pull Request](https://help.github.com/articles/creating-a-pull-request/#creating-the-pull-request) with a clear title and description. + +**Tips**: +- For ambitious tasks, open a Pull Request as soon as possible with the `[WIP]` prefix i nthe title, in order to get feedback and help from the community. + +## Coding rules + +### Source code + +To ensure consistency and quality throughout the source code, all code modification must: +- Have no [linting](#lint) errors +- Make sure there is a [test](#tests) for every possible cases introduced by your code change +- The test coverage is **100%** +- The commit message(s) follow the [guideline](#commit-message-guidelines) +- Documentation is added for new features +- Documentation is updated for modified features + +### Documentation + +To ensure consistency and quality all documentation modification must: +- Refer to brand in [bold](https://help.github.com/articles/basic-writing-and-formatting-syntax/#styling-text) with proper capitalization, i.e. **GitHub**, **semantic-release**, **npm** +- Prefer [tables](https://help.github.com/articles/organizing-information-with-tables) over [lists](https://help.github.com/articles/basic-writing-and-formatting-syntax/#lists) when listing key values, i.e. List of options with their description +- Use [links](https://help.github.com/articles/basic-writing-and-formatting-syntax/#links) when, the first you are referring to: + - a **semantic-release** concept described somewhere else in the documentation, i.e. How to [contribute](CONTRIBUTING.md) + - a third-party product/brand/service, i.e. Integrate with [GitHub](https://github.com) + - an external concept or feature, i.e. Create a [GitHub release](https://help.github.com/articles/creating-releases) + - a package or module, i.e. The [`@semantic-release/github`](https://github.com/semantic-release/github) module +- Use the the [single backtick `code` quoting](https://help.github.com/articles/basic-writing-and-formatting-syntax/#quoting-code) for: + - commands inside sentences, i.e. the `semantic-release` command + - programming language keywords, i.e. `function`, `async`, `String` + - packages or modules, i.e. The [`@semantic-release/github`](https://github.com/semantic-release/github) module +- Use the the [triple backtick `code` formatting](https://help.github.com/articles/creating-and-highlighting-code-blocks) for: + - code examples + - configuration examples + - sequence of command lines + +### Commit message guidelines + +#### Commit message format + +Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes a **type**, a **scope** and a **subject**: + +```commit +(): + + + +