Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved. We appreciate your thought to contribute to open source. ❤️ We want to make contributing as easy as possible. You are welcome to:
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
Before you begin:
- Have you read the code of conduct?
- Check out the existing issues.
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
Pull requests are the best way to propose changes to the codebase (we use Github Flow). We actively welcome your pull requests:
-
Fork the repo and create your branch from the default branch.
# 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/<upsteam-owner>/<repo-name> # Update the upstream git checkout <default-branch> git pull upstream <default-branch> # Create your feature / fix branch git checkout -b <topic-branch-name>
-
If you've added code that should be tested, add tests.
-
If you've changed APIs, update the documentation.
-
Ensure the test suite passes.
-
Make sure your code lints.
-
Commit your changes, see conventional commits.
-
Locally merge (or rebase) the upstream development branch into your topic branch.
git pull [--rebase] upstream <dev-branch>
-
Open a Pull Request with a clear title and description.
-
Ensure you have the Node.js version we use, check .nvmrc. You can easily run multiple Node version with nvm.
-
Install dependencies
yarn install
-
Run
yarn run
to see the scripts available e.g.yarn run all
to build, lint and test -
Run the CLI locally
node lib/cli.js <options>
Please provide tests for your contribution.
To generate a new fixture for Markdown output run
./lib/cli.js --no-banner -s __tests__/fixtures/<action>.yml | \
tail -r | tail -n +2 | tail -r > <action_md>.output
For creating a README.md fixture, first create the readme input file for the test, and copy the same file to the an output file. Next run the following command to update the output which can be used to verify the test.
./lib/cli.js --no-banner -s __tests__/fixtures/<action>.yml -u __tests_/fixtures/<readme>.output
- we use spaces.
- You can try running
yarn run lint && yarn run format
for style unification
By contributing, you agree that your contributions will be licensed under the MIT License.