|
5 | 5 |
|
6 | 6 | # Contributing to the git gem
|
7 | 7 |
|
8 |
| -* [Summary](#summary) |
9 |
| -* [How to contribute](#how-to-contribute) |
10 |
| -* [How to report an issue or request a feature](#how-to-report-an-issue-or-request-a-feature) |
11 |
| -* [How to submit a code or documentation change](#how-to-submit-a-code-or-documentation-change) |
12 |
| - * [Commit your changes to a fork of `ruby-git`](#commit-your-changes-to-a-fork-of-ruby-git) |
13 |
| - * [Create a pull request](#create-a-pull-request) |
14 |
| - * [Get your pull request reviewed](#get-your-pull-request-reviewed) |
15 |
| -* [Design philosophy](#design-philosophy) |
16 |
| - * [Direct mapping to git commands](#direct-mapping-to-git-commands) |
17 |
| - * [Parameter naming](#parameter-naming) |
18 |
| - * [Output processing](#output-processing) |
19 |
| -* [Coding standards](#coding-standards) |
20 |
| - * [1 PR = 1 Commit](#1-pr--1-commit) |
21 |
| - * [Unit tests](#unit-tests) |
22 |
| - * [Continuous integration](#continuous-integration) |
23 |
| - * [Documentation](#documentation) |
24 |
| -* [Building a specific version of the Git command-line](#building-a-specific-version-of-the-git-command-line) |
25 |
| - * [Install pre-requisites](#install-pre-requisites) |
26 |
| - * [Obtain Git source code](#obtain-git-source-code) |
27 |
| - * [Build git](#build-git) |
28 |
| - * [Use the new Git version](#use-the-new-git-version) |
29 |
| -* [Licensing](#licensing) |
| 8 | +- [Summary](#summary) |
| 9 | +- [How to contribute](#how-to-contribute) |
| 10 | +- [How to report an issue or request a feature](#how-to-report-an-issue-or-request-a-feature) |
| 11 | +- [How to submit a code or documentation change](#how-to-submit-a-code-or-documentation-change) |
| 12 | + - [Commit your changes to a fork of `ruby-git`](#commit-your-changes-to-a-fork-of-ruby-git) |
| 13 | + - [Create a pull request](#create-a-pull-request) |
| 14 | + - [Get your pull request reviewed](#get-your-pull-request-reviewed) |
| 15 | +- [Design philosophy](#design-philosophy) |
| 16 | + - [Direct mapping to git commands](#direct-mapping-to-git-commands) |
| 17 | + - [Parameter naming](#parameter-naming) |
| 18 | + - [Output processing](#output-processing) |
| 19 | +- [Coding standards](#coding-standards) |
| 20 | + - [Commit message guidelines](#commit-message-guidelines) |
| 21 | + - [Unit tests](#unit-tests) |
| 22 | + - [Continuous integration](#continuous-integration) |
| 23 | + - [Documentation](#documentation) |
| 24 | +- [Building a specific version of the Git command-line](#building-a-specific-version-of-the-git-command-line) |
| 25 | + - [Install pre-requisites](#install-pre-requisites) |
| 26 | + - [Obtain Git source code](#obtain-git-source-code) |
| 27 | + - [Build git](#build-git) |
| 28 | + - [Use the new Git version](#use-the-new-git-version) |
| 29 | +- [Licensing](#licensing) |
30 | 30 |
|
31 | 31 | ## Summary
|
32 | 32 |
|
@@ -153,18 +153,30 @@ behavior.
|
153 | 153 | To ensure high-quality contributions, all pull requests must meet the following
|
154 | 154 | requirements:
|
155 | 155 |
|
156 |
| -### 1 PR = 1 Commit |
| 156 | +### Commit message guidelines |
157 | 157 |
|
158 |
| -* All commits for a PR must be squashed into a single commit. |
159 |
| -* To avoid an extra merge commit, the PR must be able to be merged as [a fast-forward |
160 |
| - merge](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging). |
161 |
| -* The easiest way to ensure a fast-forward merge is to rebase your local branch to |
162 |
| - the `ruby-git` master branch. |
| 158 | +All commit messages must follow the [Conventional Commits |
| 159 | +standard](https://www.conventionalcommits.org/en/v1.0.0/). This helps us maintain a |
| 160 | +clear and structured commit history, automate versioning, and generate changelogs |
| 161 | +effectively. |
| 162 | + |
| 163 | +To ensure compliance, this project includes: |
| 164 | + |
| 165 | +- A git commit-msg hook that validates your commit messages before they are accepted. |
| 166 | + |
| 167 | + To activate the hook, you must have node installed and run `bin/setup` or |
| 168 | + `npm install`. |
| 169 | + |
| 170 | +- A GitHub Actions workflow that will enforce the Conventional Commit standard as |
| 171 | + part of the continuous integration pipeline. |
| 172 | + |
| 173 | + Any commit message that does not conform to the Conventional Commits standard will |
| 174 | + cause the workflow to fail and not allow the PR to be merged. |
163 | 175 |
|
164 | 176 | ### Unit tests
|
165 | 177 |
|
166 |
| -* All changes must be accompanied by new or modified unit tests. |
167 |
| -* The entire test suite must pass when `bundle exec rake default` is run from the |
| 178 | +- All changes must be accompanied by new or modified unit tests. |
| 179 | +- The entire test suite must pass when `bundle exec rake default` is run from the |
168 | 180 | project's local working copy.
|
169 | 181 |
|
170 | 182 | While working on specific features, you can run individual test files or a group of
|
|
0 commit comments