Contributing to this repository
March 6, 2024 ยท View on GitHub
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. :heart: 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
Getting started
Before you begin:
- Have you read the code of conduct?
- Check out the existing issues.
We Develop with Github
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
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.
Development
Setup you local environment
-
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 runto see the scripts available e.g.yarn run allto build, lint and test -
Run the CLI locally
node lib/cli.js <options>
Adding tests
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
Use a Consistent Coding Style
- we use spaces.
- You can try running
yarn run lint && yarn run formatfor style unification
License
By contributing, you agree that your contributions will be licensed under the MIT License.