Skip to content
This repository has been archived by the owner on Mar 3, 2022. It is now read-only.

Contributing

Kiran Mova edited this page Jul 16, 2021 · 4 revisions

Overview

This page provides instructions on how to contribute to docs.

Step 1: Fork the openebs-docs repository.

You can fork from the UI at https://github.com/openebs/openebs-docs

Step 2: Rebase forked repository with latest changes

git clone https://github.com/<forked-repo>/openebs-docs.git
git add upstream https://github.com/openebs/openebs-docs.git
git branch 

git checkout staging
git pull upstream staging
git push

Note: In case you already have a fork and staging branches. Reset your staging to new staging.

The staging branch is re-created after every new release. You will not be able to cleanly fetch the upstream staging branch changes into the older staging branch. You can either delete your old fork and create a new node or use the following steps to fetch the new staging branch.

If you would like to recreate local staging, you can recreate staging.

Step 3: Create a local branch from staging

git branch <branch-name>
git checkout <branch-name>
git push --set-upstream origin <branch-name>

Step 4: Make changes and test

OpenEBS docs use cspell to validate the markdown content for spelling errors. To verify this locally prior to commit:

  • Install cspell. npm install -g cspell
  • From the root directory. Run the command: cspell --config ./cSpell.json "**/*.md"

Sometimes the tool will display some valid words as errors since they are not part of a standard dictionary. You can customize the tool by adding the new words can be added to one of the following files:

  • hack/cspell-contributors.txt - company and user names
  • hack/cspell-ignore.txt - random text that is part of code output
  • hack/cspell-words.txt - technology words

Rerun the tool to check that errors are fixed.

Step 5: Push changes to your forked repository

After verifying that the content is as you expected, commit and push the changes using the following commands.

git branch
#verify that you are in a branch where changes need to be committed. 

#To list the new and modified files use git status.  
#Run git add <file or directory> to stage for commit. Or alternatively, add all changes from the local directory to commit by git add .:
git status
git add . 

#repeat the above git status and git add commands till all the files you want to submit are staged. 

git commit -s
#In the editor, add details about the commit. 

git push --set-upstream origin <branch-name>

Step 6: Raise the PR for review

From your browser, visit https://github.com/openebs/openebs-docs/pulls and create new pull request from your feature branch to staging.