diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..9effea5 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,241 @@ +# How to contribute to cypress-har-generator + +## Table of contents + +- [Your First Contribution](#your-first-contribution) +- [Forks and Branches](#forks-and-branches) + - [Start a feature branch](#start-a-feature-branch) + - [Commit Message Format](#commit-message-format) +- [How to work on cypress-har-generator](#how-to-work-on-cypress-har-generator) +- [Installation](#installation) + - [Build](#build) + - [Tests](#tests) + - [Running unit tests](#running-unit-tests) + - [Running end-to-end tests](#running-end-to-end-tests) + - [Linting](#linting) + - [Formatting](#formatting) + - [Creating publishable package](#creating-publishable-package) + +## Your First Contribution + +Working on your first Pull Request? You can learn how from this free series, [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github). + +## Forks and Branches + +All contributions must be submitted as a [Pull Request (PR)](https://help.github.com/articles/about-pull-requests/) so you need to [fork this repo](https://help.github.com/articles/fork-a-repo/) on your GitHub account. + +The main branch aka mainline is `master`, it contains the latest code, and it is undergoing major development. Any other branch is temporary and could be deleted. You can read more about the [Trank-based development](https://trunkbaseddevelopment.com/) to get a deep understanding of how it works. + +> ⚡ All PRs must be against the `master` branch to be considered. + +A valid PR must follow these points: + +- Unit test is correctly implemented and covers the new scenario. +- If the code introduces a new feature, please add documentation or describe the feature in the PR description. +- The commit message follows [the conventional commit](#commit-message-format). +- The reviewer is assigned from the developers of the same project or code owners, possibly related to the task designed or a component affected. +- If you are going to work on new features or fix bugs or make significant architecture changes, create an issue before sending a PR, use [close keywords](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) to link an issue, and PR. + +The PR, which is **NOT** planned to be merged, has to be converted to draft PR. + +To release a new version, you should issue the following commands: + +```bash +git fetch origin +git checkout master +git merge --squash branch-name +git commit -m 'message' +``` + +Use `--squash`, to leave the history of commits in feature-branch and prevents the Git merge command from creating a merge commit. + +### Start a feature branch + +To create a feature branch you should issue the following commands: + +```bash +git fetch +git checkout --no-track -b branch-name origin/master +``` + +Each branch name consists of a **type**, **ref,** and **subject**. + +``` +[#]/ +``` + +Where `type` - can accept one of the values are described [below](#commit-message-format), `ref` \- reference GitHub issues, Jira tickets, or other PRs. + +e.g. `fix-#184/multiple-hosts-are-duplicated` or `fix/multiple-hosts-are-duplicated` + +The `type` and `subject` are mandatory, the `ref` is optional. + +### Commit Message Format + +The commits must follow the [https://www.conventionalcommits.org/en/v1.0.0/](https://www.conventionalcommits.org/en/v1.0.0/) naming convention. Please make sure to read the full guideline. + +Each commit message consists of a **header**, a **body**, and a **footer**. + +``` +
+ + + +