Skip to content

doc(#318): add documentation about WinError 995 #431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Oct 9, 2021
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,3 @@ Add output of the following command to include the following
```bash
cz version --report
```

26 changes: 1 addition & 25 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ After the configuration is added, you'll need to run
pre-commit install --hook-type commit-msg
```

Read more about the `check` command [here](https://commitizen-tools.github.io/commitizen/check/).
Read more about the `check` command [here](check.md).

### Help

Expand Down Expand Up @@ -169,30 +169,6 @@ eval "$(register-python-argcomplete cz)"

For further information on activation, please visit the [argcomplete website](https://kislyuk.github.io/argcomplete/).

## Third-Party Commitizen Templates

See [Third-Party Commitizen Templates](third-party-commitizen.md).

## FAQ

### Why are `revert` and `chore` valid types in the check pattern of cz conventional_commits but not types we can select?

`revert` and `chore` are added to the "pattern" in `cz check` in order to prevent backward errors, but officially they are not part of conventional commits, we are using the latest [types from Angular](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#type) (they used to but were removed).
However, you can create a customized `cz` with those extra types. (See [Customization](https://commitizen-tools.github.io/commitizen/customization))

See more discussion in issue [#142](https://github.com/commitizen-tools/commitizen/issues/142) and [#36](https://github.com/commitizen-tools/commitizen/issues/36)

### How to handle revert commits?

```sh
git revert --no-commit <SHA>
git commit -m "revert: foo bar"
```

## Contributing

See [Contributing](contributing.md)

[conventional_commits]: https://www.conventionalcommits.org
[semver]: https://semver.org/
[keepchangelog]: https://keepachangelog.com/
Expand Down
22 changes: 11 additions & 11 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,17 @@ commitizen:
| ---------------- | ------ | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name` | `str` | `"cz_conventional_commits"` | Name of the committing rules to use |
| `version` | `str` | `None` | Current version. Example: "0.1.2" |
| `version_files` | `list` | `[ ]` | Files were the version will be updated. A pattern to match a line, can also be specified, separated by `:` [See more](version_files) |
| `tag_format` | `str` | `None` | Format for the git tag, useful for old projects, that use a convention like `"v1.2.1"`. [See more](tag_format) |
| `bump_message` | `str` | `None` | Create custom commit message, useful to skip ci. [See more](bump_message) |
| `version_files` | `list` | `[ ]` | Files were the version will be updated. A pattern to match a line, can also be specified, separated by `:` [See more][version_files] |
| `tag_format` | `str` | `None` | Format for the git tag, useful for old projects, that use a convention like `"v1.2.1"`. [See more][tag_format] |
| `bump_message` | `str` | `None` | Create custom commit message, useful to skip ci. [See more][bump_message] |
| `changelog_file` | `str` | `CHANGELOG.md` | filename of exported changelog |
| `style` | `list` | see above | Style for the prompts (It will merge this value with default style.) [See More (Styling your prompts with your favorite colors)](additional-features) |
| `customize` | `dict` | `None` | **This is only supported when config through `toml`.** Custom rules for committing and bumping. [See more](customization) |
| `use_shortcuts` | `bool` | `false` | If enabled, commitizen will show keyboard shortcuts when selecting from a list. Define a `key` for each of your choices to set the key. [See more](shortcuts) |
| `style` | `list` | see above | Style for the prompts (It will merge this value with default style.) [See More (Styling your prompts with your favorite colors)][additional-features] |
| `customize` | `dict` | `None` | **This is only supported when config through `toml`.** Custom rules for committing and bumping. [See more][customization] |
| `use_shortcuts` | `bool` | `false` | If enabled, commitizen will show keyboard shortcuts when selecting from a list. Define a `key` for each of your choices to set the key. [See more][shortcuts] |

[version_files]: https://commitizen-tools.github.io/commitizen/bump/#version_files
[tag_format]: https://commitizen-tools.github.io/commitizen/bump/#tag_format
[bump_message]: https://commitizen-tools.github.io/commitizen/bump/#bump_message
[version_files]: bump.md#version_files
[tag_format]: bump.md#tag_format
[bump_message]: bump.md#bump_message
[additional-features]: https://github.com/tmbo/questionary#additional-features
[customization]: https://commitizen-tools.github.io/commitizen/customization/
[shortcuts]: https://commitizen-tools.github.io/commitizen/customization/#shortcut-keys
[customization]: customization.md
[shortcuts]: customization.md#shortcut-keys
3 changes: 2 additions & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ If you're a first-time contributor, you can check the issues with [good first is
7. Use [commitizen](https://github.com/commitizen-tools/commitizen) to do git commit. We follow [conventional commmits][conventional-commmits]
8. Run `./scripts/format` and `./scripts/test` to ensure you follow the coding style and the tests pass.
9. Update `README.md`. Do **not** update the `CHANGELOG.md`, it will be automatically created after merging to `master`.
10. Send a [pull request](https://github.com/commitizen-tools/commitizen/pulls) 🙏
10. If your changes are about documentation. Run `poetry run mkdocs serve` to serve documentation locally and check whether there is any warning or error.
11. Send a [pull request](https://github.com/commitizen-tools/commitizen/pulls) 🙏

[conventional-commmits]: https://www.conventionalcommits.org/
4 changes: 2 additions & 2 deletions docs/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ commitizen:

#### Shortcut keys

When the [`use_shortcuts`](https://commitizen-tools.github.io/commitizen/config/#settings) config option is enabled, commitizen can show and use keyboard shortcuts to select items from lists directly.
When the [`use_shortcuts`](config.md#settings) config option is enabled, commitizen can show and use keyboard shortcuts to select items from lists directly.
For example, when using the `cz_conventional_commits` commitizen template, shortcut keys are shown when selecting the commit type. Unless otherwise defined, keyboard shortcuts will be numbered automatically.
To specify keyboard shortcuts for your custom choices, provide the shortcut using the `key` parameter in dictionary form for each choice you would like to customize.

## 2. Customize through customizing a class

The basic steps are:
Expand Down
15 changes: 14 additions & 1 deletion docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ version_files = [
## Why are `revert` and `chore` valid types in the check pattern of cz conventional_commits but not types we can select?

`revert` and `chore` are added to the "pattern" in `cz check` in order to prevent backward errors, but officially they are not part of conventional commits, we are using the latest [types from Angular](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#type) (they used to but were removed).
However, you can create a customized `cz` with those extra types. (See [Customization](https://commitizen-tools.github.io/commitizen/customization/)
However, you can create a customized `cz` with those extra types. (See [Customization](customization.md)

See more discussion in issue [#142](https://github.com/commitizen-tools/commitizen/issues/142) and [#36](https://github.com/commitizen-tools/commitizen/issues/36)

Expand Down Expand Up @@ -73,3 +73,16 @@ If you are using conventional commits in your git history, then you could swap o
Regarding the name, [cz-js][cz-js] came first, they used the word commitizen first. When this project was created originally, the creator read "be a good commitizen", and thought it was just a cool word that made sense, and this would be a package that helps you be a good "commit citizen".

[cz-js]: https://github.com/commitizen/cz-cli

## How to handle revert commits?

```sh
git revert --no-commit <SHA>
git commit -m "revert: foo bar"
```

## I got `Exception [WinError 995] The I/O operation ...` error

This error was caused by a Python bug on Windows. It's been fixed by [this PR](https://github.com/python/cpython/pull/22017), and according to Python's changelog, [3.8.6rc1](https://docs.python.org/3.8/whatsnew/changelog.html#python-3-8-6-release-candidate-1) and [3.9.0rc2](https://docs.python.org/3.9/whatsnew/changelog.html#python-3-9-0-release-candidate-2) should be the accurate versions first contain this fix. In conclusion, upgrade your Python version might solve this issue.

More discussion can be found in issue [#318](https://github.com/commitizen-tools/commitizen/issues/318).
2 changes: 1 addition & 1 deletion docs/tutorials/gitlab_ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ _Goal_: Bump a new version every time that a change occurs on the `master` branc
2. A developer creates a merge request (MR) against `master` branch
3. When the `MR` is merged into master, the 2 stages of the CI are executed
4. For simplification, we store the software version in a file called `VERSION`. You can use any file that you want as `commitizen` supports it.
5. The commit message executed automatically by the `CI` must include `[skip-ci]` in the message; otherwise, the process will generate a loop. You can define the message structure in [commitizen](https://commitizen-tools.github.io/commitizen/bump/) as well.
5. The commit message executed automatically by the `CI` must include `[skip-ci]` in the message; otherwise, the process will generate a loop. You can define the message structure in [commitizen](../bump.md) as well.

### Gitlab Configuration

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/writing_commits.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ understand what happened.
| `fix(commands): bump error when no user provided` | `fix: stuff` |
| `feat: add new commit command` | `feat: commit command introduced` |

[customization]: https://commitizen-tools.github.io/commitizen/customization/
[customization]: ../customization.md
[conventional_commits]: https://www.conventionalcommits.org