|
22 | 22 | - [Pull Request](#pull-request)
|
23 | 23 | - [Breaking Change](#breaking-change)
|
24 | 24 | - [Merging](#merging)
|
| 25 | + - [Breaking Change](#breaking-change-1) |
| 26 | + - [Reverting](#reverting) |
25 | 27 | - [Versioning](#versioning)
|
26 | 28 | - [Code of Conduct](#code-of-conduct)
|
27 | 29 |
|
@@ -335,17 +337,30 @@ If a pull request contains a braking change, the description of the pull request
|
335 | 337 |
|
336 | 338 | The following guide is for anyone who merges a contributor pull request into the working branch, the working branch into a release branch, a release branch into another release branch, or any other direct commits such as hotfixes into release branches or the working branch.
|
337 | 339 |
|
338 |
| -- For changelog generation, only the commit message set when merging the pull request is relevant. The title and description of the GitHub pull request as authored by the contributor have no influence on the changelog generation. However, the title of the GitHub pull request should be used as the commit message. |
339 |
| -- If the pull request contains a breaking change, the commit message must contain the phrase `BREAKING CHANGE`, capitalized and without any formatting, followed by a short description of the breaking change and ideally how the developer should address it, all in a single line. This line should contain more details focusing on the "breaking” aspect of the change and is intended to assist the developer in adapting. Keep it concise, as it will become part of the changelog entry, for example: |
| 340 | +- A contributor pull request must be merged into the working branch using `Squash and Merge`, to create a single commit message that describes the change. |
| 341 | +- A release branch or the default branch must be merged into another release branch using `Merge Commit`, to preserve each individual commit message that describes its respective change. |
| 342 | +- For changelog generation, only the commit message set when merging the pull request is relevant. The title and description of the GitHub pull request as authored by the contributor have no influence on the changelog generation. However, the title of the GitHub pull request should be used as the commit message. See the following chapters for considerations in special scenarios, e.g. merging a breaking change or reverting a commit. |
| 343 | + |
| 344 | +### Breaking Change |
| 345 | + |
| 346 | +If the pull request contains a breaking change, the commit message must contain the phrase `BREAKING CHANGE`, capitalized and without any formatting, followed by a short description of the breaking change and ideally how the developer should address it, all in a single line. This line should contain more details focusing on the "breaking” aspect of the change and is intended to assist the developer in adapting. Keep it concise, as it will become part of the changelog entry, for example: |
340 | 347 |
|
341 | 348 | ```
|
342 | 349 | fix: remove handle from door
|
343 | 350 |
|
344 | 351 | BREAKING CHANGE: You cannot open the door anymore by using a handle. See the [#migration guide](http://example.com) for more details.
|
345 | 352 | ```
|
346 | 353 | Keep in mind that in a repository with release automation, merging such a commit message will trigger a release with a major version increment.
|
347 |
| -- A contributor pull request must be merged into the working branch using `Squash and Merge`, to create a single commit message that describes the change. |
348 |
| -- A release branch or the default branch must be merged into another release branch using `Merge Commit`, to preserve each individual commit message that describes its respective change. |
| 354 | +
|
| 355 | +### Reverting |
| 356 | +
|
| 357 | +If the commit reverts a previous commit, use the prefix `revert:`, followed by the header of the reverted commit. In the body of the commit message add `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted. For example: |
| 358 | +
|
| 359 | + ``` |
| 360 | + revert: fix: remove handle from door |
| 361 | + |
| 362 | + This reverts commit 1234567890abcdef. |
| 363 | + ``` |
349 | 364 |
|
350 | 365 | ## Versioning
|
351 | 366 |
|
|
0 commit comments