Skip to content

Latest commit

 

History

History
103 lines (67 loc) · 4.47 KB

CONTRIBUTING.md

File metadata and controls

103 lines (67 loc) · 4.47 KB

Contribution Guidelines

Thanks for being willing to contribute!

We appreciate bug reports, feature requests, doc updates, fixing open issues, and other contributions. Please follow our Code Of Conduct and the guide below.

Bug Reports

A bug is a recreatable problem that is caused by the code in the repository.

Before submitting bug reports:

  1. Check if the issue has already been reported
  2. Recreate the bug — clone master and use our bug recreation template for chai-openapi-response-validator or jest-openapi.

Feature Requests

Feature requests are welcome. Provide clear reasons for why, how, and when you'd use the new feature.

Consider whether your idea fits with the scope and aims of the project. It's up to you to convince the project's developers of the merits of this feature.

Pull Requests

  • Good PRs are a fantastic help!
  • PRs must pass yarn test:ci
  • New code should be consistent with existing code.
  • PRs should remain focused in scope and not contain unrelated commits or code changes.
  • Please ask before embarking on any significant pull request, to ensure we will want to merge into the project.
  • If this is your first pull request for this project, please add yourself as a contributor! Just comment on your pull request: @all-contributors please add <your-username> for <contribution> (see example) and the All Contributors bot will raise a PR adding you to the Contributors section of our main README.

Follow this process if you'd like to work on this project:

1. Fork the project, clone your fork, and configure the remotes

# Clone your fork of the repo into the current directory
git clone https://github.com/<your-username>/<repo-name>

# Navigate to the newly cloned directory
cd <repo-name>

# Assign the original repo to a remote called "upstream"
git remote add upstream https://github.com/<upstream-owner>/<repo-name>

2. If you cloned a while ago, get the latest changes from upstream

git checkout <dev-branch>
git pull upstream <dev-branch>

3. Create a new topic branch (off the main project development branch) to contain your feature, change, or fix

git checkout -b <topic-branch-name>

4. Test that your code works

To test changes to a particular package, you can run these from within the package/<packageName> dir (e.g. package/jest-openapi):

# run all tests
yarn test

# run all tests, with coverage check
yarn test:coverage

# run all tests, with coverage check, and opens the coverage report in your browser
yarn test:coverage:browse

# run eslint check
yarn lint

# [MUST] run all the above checks
yarn test:ci

To test both packages, run the above from the root dir.

5. Commit your changes in logical chunks

  • Use Git's interactive rebase feature to tidy up your commits before making them public.
  • We use Husky to run code-quality checks on every commit. This informs you early on if your code is not ready to be saved in Git history. If a commit fails a check, fix the problem then commit again.

6. Locally merge (or rebase) the upstream development branch into your topic branch

git pull [--rebase] upstream <dev-branch>

7. Push your topic branch up to your fork

git push origin <topic-branch-name>

8. Open a Pull Request with a clear title and description. Link it to the relevant issue