There are many ways you can contribute to the Yosai Project, from bug identification
to refactoring, writing extensions or creating integrations. It is important
that our working environment be friendly and welcoming to all potential contributors.
With that given, you are to abide by some simple guidelines outlined in the
Code of Conduct.
The Yosai community has a Google Group. The Community page i has more information about that.
If you want to file a bug report, suggest a feature, or ask a code-related
question, please go to the yosaiproject/yosai
repository on GitHub and
create a new Issue. (You
will need a GitHub account (free).) Please
describe the issue clearly, including steps to reproduce when you report a bug.
To contribute code or documentation, you need a GitHub account.
Familiarize yourself with Yosai's coding convention, architecture, and documentation including:
- testing requirements
- documentation strategy
- semantic versioning
In your web browser, go to the Yosai repository on GitHub
and click the Fork
button in the top right corner. This creates a new Git
repository named yosai
in your GitHub account.
(This only has to be done once.) In your local terminal, use Git to clone your
yosai
repository to your local computer. Also add the original GitHub
yosaiproject/yosai repository as a remote named upstream
(a convention):
git clone [email protected]:your-github-username/yosai.git
cd yosai
git add upstream [email protected]:yosaiproject/yosai.git
Switch to the develop
branch locally, fetch all upstream
branches, and
merge the just-fetched upstream/develop
branch with the local develop
branch:
git checkout develop
git fetch upstream
git merge upstream/develop
If your new branch is to fix a bug identified in a specific GitHub Issue
with number ISSNO
, then name your new branch bug/ISSNO/short-description-here
.
For example, bug/12/fix-password-salt-format
.
If your new branch is to add a feature requested in a specific GitHub Issue
with number ISSNO
, then name your new branch feat/ISSNO/short-description-here
.
For example, feat/237/multi-factor-authentication
.
Otherwise, please give your new branch a short, descriptive, all-lowercase name.
git checkout -b new-branch-name
With your new branch checked out locally, make changes or additions to the code or documentation, git add them, and git commit them.
git add new-or-changed-file
git commit -m "Short description of new or changed things"
Remember to write tests for new code, including unit (isolated) tests and integrated tests. Target a unit test coverage ratio of 90% tested. Test coverage of less than 90% affected source code will be scrutinized and potentially rejected.
Please run all existing tests to make sure you didn't break something. Tox is provided to help you run tests.
Remember to write or modify documentation to reflect your additions or changes.
You will want to merge changes from upstream (i.e. the original repository) into your new branch from time to time, using something like:
git fetch upstream
git merge upstream/develop
Ensure that you've commited all that you want to include in your pull request. Then push your new branch to origin (i.e. your remote yosai repository).
git push origin new-branch-name
Go to the GitHub website and to your remote yosai repository (i.e. something like https://github.com/your-user-name/yosai).
See [GitHub's documentation on how to initiate and send a pull request]
(https://help.github.com/articles/using-pull-requests/). Note that the
destination repository should be yosaiproject/yosai
and the destination
branch will typically be develop
.
Send the pull request.
Someone will then merge your branch or suggest changes. If we suggest changes,
you won't have to open a new pull request, you can just push new code to the
same branch (on origin
) as you did before creating the pull request.