|
| 1 | +# Contributing to ruby_git |
| 2 | + |
| 3 | +Thank you for your interest in contributing to the ruby_git project! |
| 4 | + |
| 5 | +This document gives the guidelines for contributing to this project. |
| 6 | +These guidelines may not fit every situation. When contributing use your best |
| 7 | +judgement. |
| 8 | + |
| 9 | +Propose changes to these guidelines with a pull request. |
| 10 | + |
| 11 | +## How to contribute to ruby_git |
| 12 | + |
| 13 | +You can contribute in two ways: |
| 14 | + |
| 15 | +1. [Report an issue or make a feature request](#how-to-report-an-issue-or-make-a-feature-request) |
| 16 | +2. [Submit a code or documentation change](#how-to-submit-a-code-or-documentation-change) |
| 17 | + |
| 18 | +## How to report an issue or make a feature request |
| 19 | + |
| 20 | +ruby_git utilizes [GitHub Issues](https://help.github.com/en/github/managing-your-work-on-github/about-issues) |
| 21 | +for issue tracking and feature requests. |
| 22 | + |
| 23 | +Report an issue or feature request by [creating a ruby_git Github issue](https://github.com/jcouball/ruby_git/issues/new). |
| 24 | +Fill in the template to describe the issue or feature request the best you can. |
| 25 | + |
| 26 | +## How to submit a code or documentation change |
| 27 | + |
| 28 | +There is three step process for code or documentation changes: |
| 29 | + |
| 30 | +1. [Commit your changes to a fork of ruby_git](#commit-changes-to-a-fork-of-ruby_git) |
| 31 | +2. [Create a pull request](#create-a-pull-request) |
| 32 | +3. [Get your pull request reviewed](#get-your-pull-request-reviewed) |
| 33 | + |
| 34 | +### Commit changes to a fork of ruby_git |
| 35 | + |
| 36 | +Make your changes in a fork of the ruby_git repository. |
| 37 | + |
| 38 | +### Create a pull request |
| 39 | + |
| 40 | +See [this article](https://help.github.com/articles/about-pull-requests/) if you |
| 41 | +are not familiar with GitHub Pull Requests. |
| 42 | + |
| 43 | +Follow the instructions in the pull request template. |
| 44 | + |
| 45 | +### Get your pull request reviewed |
| 46 | + |
| 47 | +Code review takes place in a GitHub pull request using the [the Github pull request review feature](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-request-reviews). |
| 48 | + |
| 49 | +Once your pull request is ready for review, request a review from at least one |
| 50 | +[maintainer](MAINTAINERS.md) and any number of other contributors. |
| 51 | + |
| 52 | +During the review process, you may need to make additional commits which would |
| 53 | +need to be squashed. It may also be necessary to rebase to main again if other |
| 54 | +changes are merged before your PR. |
| 55 | + |
| 56 | +At least one approval is required from a project maintainer before your pull |
| 57 | +request can be merged. The maintainer is responsible for ensuring that the pull |
| 58 | +request meets [the project's coding standards](#coding-standards). |
| 59 | + |
| 60 | +## Coding standards |
| 61 | + |
| 62 | +In order to ensure high quality, all pull requests must meet these requirements: |
| 63 | + |
| 64 | +### 1 PR = 1 Commit |
| 65 | + * All commits for a PR must be squashed into one commit |
| 66 | + * To avoid an extra merge commit, the PR must be able to be merged as [a fast forward merge](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging) |
| 67 | + * The easiest way to ensure a fast forward merge is to rebase your local branch |
| 68 | + to the ruby_git main branch |
| 69 | + |
| 70 | +### Unit tests |
| 71 | + * All changes must be accompanied by new or modified RSpec unit tests |
| 72 | + * The entire test suite must pass when `bundle exec rake spec` is run from the |
| 73 | + project's local working copy |
| 74 | + * The unit test suite must maintain 100% code coverage to pass |
| 75 | + |
| 76 | +### Documentation |
| 77 | + * New and updated public methods must have [YARD](https://yardoc.org/) |
| 78 | + documentation added to them |
| 79 | + * New and updated public facing features should be documented in the project's |
| 80 | + [README.md](README.md) |
| 81 | + * All documentation must pass `yardstick` documentation analysis. |
| 82 | + * The documentation suite must maintain 100% documentation to pass |
| 83 | + |
| 84 | +### Continuous Integration |
| 85 | + * All tests must pass in the project's [Travis CI](https://travis-ci.org/jcouball/ruby_git) |
| 86 | + build before the pull request will be merged |
| 87 | + |
| 88 | +## Licensing |
| 89 | + |
| 90 | +ruby_git uses [the MIT license](https://choosealicense.com/licenses/mit/) as |
| 91 | +declared in the [LICENSE](LICENSE) file. |
| 92 | + |
| 93 | +Licensing is very important to open source projects. It helps ensure the |
| 94 | +software continues to be available under the terms that the author desired. |
| 95 | + |
0 commit comments