Skip to content

Latest commit

 

History

History
102 lines (64 loc) · 3.27 KB

CONTRIBUTING.md

File metadata and controls

102 lines (64 loc) · 3.27 KB

Contributing to this repository

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

Getting started

Before you begin:

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:

  1. 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>
  2. If you've added code that should be tested, add tests.

  3. If you've changed APIs, update the documentation.

  4. Ensure the test suite passes.

  5. Make sure your code lints.

  6. Commit your changes, see conventional commits.

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

    git pull [--rebase] upstream <dev-branch>
  8. Open a Pull Request with a clear title and description.

Development

Setup you local environment

  1. Ensure you have the Node.js version we use, check .nvmrc. You can easily run multiple Node version with nvm.

  2. Install dependencies yarn install

  3. Run yarn run to see the scripts available e.g. yarn run all to build, lint and test

  4. 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 format for style unification

License

By contributing, you agree that your contributions will be licensed under the MIT License.